| Author |
|
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 18 December 2009 at 4:29am | IP Logged
|
|
|
I have put it online, but the content does not change: Please see: http://test.digitalmedialab.nl/samiech (url.navigation_id =2) and http://test.digitalmedialab.nl/samiech/test (url.navigation_id =4)
mapf.txt looks like: test 4
mapfile.txt looks like: samiech 2
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 18 December 2009 at 4:54am | IP Logged
|
|
|
Oh, sorry i think i didn't get you right... I thought you need to change 2 diffrent parameters, not one.
Please, erase last rule and lets get back to
Insert in your mapfile this entry:
samiech 2
samiech/test 4
As for test try to run this rule:
RewriteEngine on
RewriteBase /
RewriteMap mapfile txt:mapfile.txt [NC]
RewriteCond ${mapfile:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^([^/]+)$ index.cfm?navigation_id=${mapfile:$1}&seo_url1=$1 [NC,L]
RewriteCond ${mapfile:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^(.*)$ index.cfm?navigation_id=${mapfile:$1}&main_id=$2&seo_url1=$1&seo_url2=$2 [NC,L]
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 18 December 2009 at 5:00am | IP Logged
|
|
|
One last thing. I also need the main_id, see http://test.digitalmedialab.nl/Samiech/test
It don't publish my main_id
Original url: http://test.digitalmedialab.nl/index.cfm?navigation_id=4&main_id=2&seo_url1=samiech&seo_url2=test
Edited by samall2 - 18 December 2009 at 5:05am
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 18 December 2009 at 5:27am | IP Logged
|
|
|
What do you mean by publish?
"It don't publish my main_id"
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 18 December 2009 at 5:32am | IP Logged
|
|
|
On: http://test.digitalmedialab.nl/index.cfm?navigation_id=4&main_id=2&seo_url1=samiech&seo_url2=test
you see the url.main_id= 2
on
http://test.digitalmedialab.nl/Samiech/test you see the url.main_id = [empty]
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 18 December 2009 at 6:31am | IP Logged
|
|
|
oh, try this way:
mapfile.txt:
samiech 2
samiech/test 4
RewriteEngine on
RewriteBase /
RewriteMap mapfile txt:mapfile.txt [NC]
RewriteCond ${mapfile:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^([^/]+)$ index.cfm?navigation_id=${mapfile:$1}&seo_url1=$1 [NC,L]
RewriteCond ${mapfile:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^(([^/]+)/([^/]+))$ index.cfm?navigation_id=${mapfile:$1}&main_id=2&seo_url1=$2&seo_url2=$3 [NC,L]
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 18 December 2009 at 10:21am | IP Logged
|
|
|
main_id also changes everytime, so main_id=2 will not work for other url's.
I have writting the original url's at http://test.digitalmedialab.nl/samiech
Edited by samall2 - 18 December 2009 at 10:34am
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 21 December 2009 at 1:00am | IP Logged
|
|
|
So is everything working for you?
Any further assistance needed?
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 21 December 2009 at 2:34am | IP Logged
|
|
|
Hi,
No, I only want that main_id is also change.
I have writting the original url's at http://test.digitalmedialab.nl/samiech
as you can see main_id change sometimes.
Thanks!
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 21 December 2009 at 5:16am | IP Logged
|
|
|
I haven't found certain algorithm in main_id and navigation_id change.
So its easier for you to decide what answer option to choose:
a) you can change the rule so that it will match index.cfm?(.*) (now it matches like this: navigation_id=(.*)&main_id=(.*))
so mapfile will look like:
samiech navigation_id=4
samiech/test navigation_id=4&main_id=2
b) create a rule that will check navigation_id with one mapfile and main_id in another map file.
and then combine it into 1 URL as i offered earlier. (see 18 December 2009 at 4:17am)
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 21 December 2009 at 5:29am | IP Logged
|
|
|
The algorithm is this:
I have 3 levels of navigation:
level 1: navigation_id=x&main_id=x (or main_id = empty, but it can be the same as navigation_id on this level) level 2: navigation_id=y&main_id=x level 3: navigation_id=z&main_id=y
So for example:
The level 1 navigation is: CONTACT (navigation_id=1 and main_id=1) Under CONTACT i have e-mail (navigation_id=33 and main_id=1 (because it's parent is CONTACT). Under CONTACT i have phone (navigation_id=444 and main_id=1 (because it's parent is CONTACT). Under PHONE I have COUNTRY (navigation_id=333 and main_id=444 (because it's parent is PHONE).
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 21 December 2009 at 7:20am | IP Logged
|
|
|
There needs to be an additional parameter, 'cause one word can't be rewritten to different parameters:
/samiech --> navigation_id=x&main_id=x
/samiech --> navigation_id=x
i'd suggest:
/samiech/smth --> navigation_id=x&main_id=x
/samiech --> navigation_id=x
RewriteEngine on
RewriteBase /
RewriteMap mapfile txt:mapfile.txt [NC]
RewriteMap mapf txt:mapf.txt [NC]
RewriteCond ${mapfile:$1|NOT_FOUND} !NOT_FOUND
RewriteCond ${mapf:$2|NOT_FOUND} !NOT_FOUND
RewriteRule ^([^/]+)(?:/([^/]+))?$ index.cfm?navigation_id=${mapfile:$1}?2$&main_id=${mapf:$2} [NC,L]
Fill the mapfile.txt with navigation_id parameters
email 33
phone 444
country 333
Fill the mapf.txt with main_id parameters
contact 1
phne 444
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 21 December 2009 at 7:35am | IP Logged
|
|
|
Thanks for your help.
I have insert your code.
This level 1 navigation is working: http://test.digitalmedialab.nl/Samiech
The level 2 navigation is not working: http://test.digitalmedialab.nl/Samiech/test
mapf.txt looks like: samiech 2 gfdsgf 3
mapfile.txt looks like: samiech 2 gfdsgf 3 test 4 gsdfgsf 1
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 21 December 2009 at 7:44am | IP Logged
|
|
|
My guess is that you missplaced content of the files.
Please, put "samiech 2" to mapfile.txt and "test 4" to mapf.txt
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 21 December 2009 at 7:52am | IP Logged
|
|
|
no same error.
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 21 December 2009 at 8:06am | IP Logged
|
|
|
Would you, please, provide the rewrite log file?
Edited by AndrushkaUS - 22 December 2009 at 2:51am
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 21 December 2009 at 8:38am | IP Logged
|
|
|
95.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15955576/initial] (1) Htaccess process request c:\inetpub\wwwroot\test.digitalmedialab.nl\.htaccess 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15955576/initial] (3) applying pattern '^([^/]+)$' to uri 'samiech/test' 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15955576/initial] (3) applying pattern '^(([^/]+)/([^/]+))$' to uri 'samiech/test' 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15955576/initial] (5) map lookup FAILED: map=mapfile[txt] key=samiech/test 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15955576/initial] (4) RewriteCond: input='NOT_FOUND' pattern='NOT_FOUND' => not-matched 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15218680/initial] (2) init rewrite engine with requested uri /favicon.ico 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15218680/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15218680/initial] (1) Htaccess process request c:\inetpub\wwwroot\test.digitalmedialab.nl\.htaccess 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15218680/initial] (3) applying pattern '^([^/]+)$' to uri 'favicon.ico' 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15218680/initial] (5) map lookup FAILED: map=mapfile[txt] key=favicon.ico 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15218680/initial] (4) RewriteCond: input='NOT_FOUND' pattern='NOT_FOUND' => not-matched 195.182.195.78 195.182.195.78 Mon, 21-Dec-2009 14:35:25 GMT [test.digitalmedialab.nl/sid#30][rid#15218680/initial] (3) applying pattern '^(([^/]+)/([^/]+))$' to uri 'favicon.ico'
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 21 December 2009 at 8:47am | IP Logged
|
|
|
According to log you left ^(([^/]+)/([^/]+))$ part of the rule and didn't change it.
Please, check the rule I provided.
Edited by AndrushkaUS - 21 December 2009 at 8:47am
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 21 December 2009 at 8:53am | IP Logged
|
|
|
Ok sorry for that.
It is not working: http://test.digitalmedialab.nl/Samiech/test and http://test.digitalmedialab.nl/Samiech
|
| Back to Top |
|
| |
samall2 Newbie

Joined: 15 December 2009
Online Status: Offline Posts: 38
|
| Posted: 21 December 2009 at 8:55am | IP Logged
|
|
|
82.94.124.209 82.94.124.209 Mon, 21-Dec-2009 15:24:16 GMT [test.digitalmedialab.nl/sid#30][rid#16777608/initial] (2) init rewrite engine with requested uri /Samiech 82.94.124.209 82.94.124.209 Mon, 21-Dec-2009 15:24:16 GMT [test.digitalmedialab.nl/sid#30][rid#16777608/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 82.94.124.209 82.94.124.209 Mon, 21-Dec-2009 15:24:16 GMT [test.digitalmedialab.nl/sid#30][rid#16777608/initial] (1) Htaccess process request c:\inetpub\wwwroot\test.digitalmedialab.nl\.htaccess 82.94.124.209 82.94.124.209 Mon, 21-Dec-2009 15:24:16 GMT [test.digitalmedialab.nl/sid#30][rid#16777608/initial] (3) applying pattern '^([^/]+)(?:/([^/]+))?$' to uri 'Samiech' 82.94.124.209 82.94.124.209 Mon, 21-Dec-2009 15:24:16 GMT [test.digitalmedialab.nl/sid#30][rid#16777608/initial] (5) map lookup OK: map=m[txt] key=Samiech -> val=2 82.94.124.209 82.94.124.209 Mon, 21-Dec-2009 15:24:16 GMT [test.digitalmedialab.nl/sid#30][rid#16777608/initial] (4) RewriteCond: input='2' pattern='NOT_FOUND' => matched 82.94.124.209 82.94.124.209 Mon, 21-Dec-2009 15:24:16 GMT [test.digitalmedialab.nl/sid#30][rid#16777608/initial] (4) RewriteCond: input='${mapf:|NOT_FOUND}' pattern='NOT_FOUND' => not-matched
|
| Back to Top |
|
| |