This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: rewrite url question Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 18 December 2009 at 4:29am | IP Logged Quote samall2

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 View samall2's Profile Search for other posts by samall2
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 18 December 2009 at 4:54am | IP Logged Quote Guests

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 View Guests's Profile Search for other posts by Guests
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 18 December 2009 at 5:00am | IP Logged Quote samall2

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 View samall2's Profile Search for other posts by samall2
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 18 December 2009 at 5:27am | IP Logged Quote Guests

What do you mean by publish?
"It don't publish my main_id"
Back to Top View Guests's Profile Search for other posts by Guests
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 18 December 2009 at 5:32am | IP Logged Quote samall2

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 View samall2's Profile Search for other posts by samall2
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 18 December 2009 at 6:31am | IP Logged Quote Guests

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 View Guests's Profile Search for other posts by Guests
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 18 December 2009 at 10:21am | IP Logged Quote samall2

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 View samall2's Profile Search for other posts by samall2
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 21 December 2009 at 1:00am | IP Logged Quote Guests

So is everything working for you?
Any further assistance needed?
Back to Top View Guests's Profile Search for other posts by Guests
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 21 December 2009 at 2:34am | IP Logged Quote samall2

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 View samall2's Profile Search for other posts by samall2
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 21 December 2009 at 5:16am | IP Logged Quote Guests

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 View Guests's Profile Search for other posts by Guests
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 21 December 2009 at 5:29am | IP Logged Quote samall2

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 View samall2's Profile Search for other posts by samall2
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 21 December 2009 at 7:20am | IP Logged Quote Guests

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 View Guests's Profile Search for other posts by Guests
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 21 December 2009 at 7:35am | IP Logged Quote samall2

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 View samall2's Profile Search for other posts by samall2
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 21 December 2009 at 7:44am | IP Logged Quote Guests

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 View Guests's Profile Search for other posts by Guests
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 21 December 2009 at 7:52am | IP Logged Quote samall2

no same error.


Back to Top View samall2's Profile Search for other posts by samall2
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 21 December 2009 at 8:06am | IP Logged Quote Guests

Would you, please, provide the rewrite log file?

Edited by AndrushkaUS - 22 December 2009 at 2:51am
Back to Top View Guests's Profile Search for other posts by Guests
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 21 December 2009 at 8:38am | IP Logged Quote samall2

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 View samall2's Profile Search for other posts by samall2
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 21 December 2009 at 8:47am | IP Logged Quote Guests

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 View Guests's Profile Search for other posts by Guests
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 21 December 2009 at 8:53am | IP Logged Quote samall2

Ok sorry for that.

It is not working:
http://test.digitalmedialab.nl/Samiech/test
and
http://test.digitalmedialab.nl/Samiech


Back to Top View samall2's Profile Search for other posts by samall2
 
samall2
Newbie
Newbie


Joined: 15 December 2009
Online Status: Offline
Posts: 38
Posted: 21 December 2009 at 8:55am | IP Logged Quote samall2

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 View samall2's Profile Search for other posts by samall2
 

<< Prev Page of 4 Next >>
  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum