This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Need help with rewrite,
Author
Message |
tijntje84
Newbie


Joined: 25 November 2007
Posts: 11
Posted: 17 December 2011 at 10:04am

Hello,

i am trying tot work with rewrite, but it doensn't work fine for me. Could you guys please help me out.

I got several links:

I use
http://www.domain.nl/assortiment/default.asp?naam=Gazelle&p=1&id=2

I need
http://www.domain.nl/assortiment/gazelle/1/2/

Rewrite:
RewriteRule /assortiment/(\d+)/(\d+)/(\d+)/? /default.asp?naam=$1&p=$2&id=$3 [L,I,I]




I use
http://www.domain.nl/assortiment/default.asp?naam=Gazelle&afm=30x30&id=2&p=1

I need
http://www.domain.nl/assortiment/gazelle/30x30/2/1/

RewriteCode:
RewriteRule /assortiment/(\d+)/(\d+)/(\d+)/? /default.asp?naam=$1&afm=$2&id=$3&p=$4 [L,L,I,I]

Can anyone help me, cause i really just dont understand the logica...
Thanks already.

Martijn
Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 18 December 2011 at 3:14am

RewriteRule /assortiment/(\w+)/(\d+)/(\d+) /assortiment/default.asp\?naam=$1&p=$2&id=$3 [I,L]

RewriteRule /assortiment/(\w+)/([^/]+)/(\d+)/(\d+) /assortiment/default.asp\?naam=$1&afm=$2&id=$3&p=$4 [I,L]

Edited by Lexey - 20 December 2011 at 1:45am
Back to Top
 
tijntje84
Newbie


Joined: 25 November 2007
Posts: 11
Posted: 18 December 2011 at 3:47pm

Hello Lexey,

I just wanted to test it, but is your rewriteRule 2.0 or 3.0, because my hostingprovider got 2.0 and it doenst work for me yet..


Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 19 December 2011 at 2:53am

These rules are for the v2. Show me URLs you are using to test these rules, please.
Back to Top
 
tijntje84
Newbie


Joined: 25 November 2007
Posts: 11
Posted: 19 December 2011 at 3:12am

http://www.domain.nl/assortiment/subgroep/1/


RewriteRule /assortiment/(\w+)/(\d+) /default.asp\?p=$1&id=$2 [I,L]




Edited by Lexey - 23 December 2011 at 4:56am
Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 20 December 2011 at 1:44am

Your rule is almost correct. Just one slash is needed at the end of the pattern:

RewriteRule /assortiment/(\w+)/(\d+)/ /default.asp\?p=$1&id=$2 [I,L]
Back to Top
 
tijntje84
Newbie


Joined: 25 November 2007
Posts: 11
Posted: 21 December 2011 at 1:48am

Hello Lexey,

Thanks for your response.
I just tested it, but it still doesn't seem to work.

Is there another way to test this?

 

Back to Top
 
tijntje84
Newbie


Joined: 25 November 2007
Posts: 11
Posted: 21 December 2011 at 4:35am

I just called my webhostin provider, because I didn't understood why my rewrite url didn't work.

They gave me the explanation that my new website is installed on a new server. And this server doesn't support ISAPI_Rewrite.

I have to copy the website to an older server, which support ISAPI_Rewrite, or I have to use .htaccess

They told me that .htaccess is in this case a better solution. So Lexey, your rule did work. It was a problem with my server.

Back to Top
 
tijntje84
Newbie


Joined: 25 November 2007
Posts: 11
Posted: 22 December 2011 at 4:36am

Hello Lexey,

can you change my domainname in my post.. to www.domain.nl? Because in google i can already find this domainname.

Thanks already!

Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 23 December 2011 at 4:56am

Done.
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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 cannot vote in polls in this forum