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: Rewrite rule problem
Author
Message |
pec
Newbie


Joined: 08 July 2011
Location: France
Posts: 2
Posted: 08 July 2011 at 4:20am

Hello,

I've got a problem with my rule.
My url is http://my_domain/recherche/fr/recherche.html?recherche=aluminium&action=rechercher

I've got somes rules
Code:

RewriteCond %SCRIPT_NAME /(.+)/(.+)/recherche.html\?recherche=(.+)&action=(.+)
RewriteRule /(.+)/(.+)/recherche.html\?recherche=(.+)&action=(.+) /recherche.php?langue=$2&recherche=$3&action=$4  [I,O]

RewriteCond %SCRIPT_NAME /(.+)/(.+)/recherche.html
RewriteRule /(.+)/(.+)/recherche.html /recherche.php?langue=$2  [I,O]


I dont know why the first rule doesn't works, this is the second running.
Someone could explain me? thanks and sorry for my english (i'm french )
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 08 July 2011 at 4:55am

Please try to optimize your rules like this:

RewriteRule /[^/]+/(.+)/recherche\.html\?recherche=(.+)&action=(.+) /recherche.php\?langue=$1&recherche=$2&action=$3 [I,L]
RewriteRule /[^/]+/(.+)/recherche\.html /recherche.php\?langue=$1 [I,L]

__________________
Regards,
Anton
Back to Top
 
pec
Newbie


Joined: 08 July 2011
Location: France
Posts: 2
Posted: 08 July 2011 at 7:39am

this works fine, thanks a lot 
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