punctweb
10-07-2008, 10:38 AM
Hello all,
Here is my problem:
i have RewriteRule that looks like this
RewriteRule find\.html/(.*)/([0-9]+) search.php?q=$1&page=$2
RewriteRule find\.html/(.*) search.php?q=$1
RewriteRule find\.html$ search.php
The url would be
http://www.somesite.com/find.html
http://www.somesite.com/find.html/somecriteria/
http://www.somesite.com/find.html/somecriteria/2
The above works fine.
But, sometimes, the url changes in
http://www.somesite.com/fr/find.html
http://www.somesite.com/fr/find.html/somecriteria/
http://www.somesite.com/fr/find.html/somecriteria/2
The fr/ part apears when multiple languages are in effect...
The url can be also
http://www.somesite.com/en/find.html or http://www.somesite.com/jp/find.html etc
I tried
RewriteRule ^(.*)/?find\.html/(.*)/([0-9]+) search.php?q=$1&page=$2
RewriteRule ^(.*)/?find\.html/(.*) search.php?q=$1
RewriteRule ^(.*)/?find\.html$ search.php
but the GET parameters do not mach in both cases, with or without the language set...
How should i write the rewrite rule in order to comply in both cases: with or without language set ?
I hope i was clear in my explication...
Thank you in advance.
Here is my problem:
i have RewriteRule that looks like this
RewriteRule find\.html/(.*)/([0-9]+) search.php?q=$1&page=$2
RewriteRule find\.html/(.*) search.php?q=$1
RewriteRule find\.html$ search.php
The url would be
http://www.somesite.com/find.html
http://www.somesite.com/find.html/somecriteria/
http://www.somesite.com/find.html/somecriteria/2
The above works fine.
But, sometimes, the url changes in
http://www.somesite.com/fr/find.html
http://www.somesite.com/fr/find.html/somecriteria/
http://www.somesite.com/fr/find.html/somecriteria/2
The fr/ part apears when multiple languages are in effect...
The url can be also
http://www.somesite.com/en/find.html or http://www.somesite.com/jp/find.html etc
I tried
RewriteRule ^(.*)/?find\.html/(.*)/([0-9]+) search.php?q=$1&page=$2
RewriteRule ^(.*)/?find\.html/(.*) search.php?q=$1
RewriteRule ^(.*)/?find\.html$ search.php
but the GET parameters do not mach in both cases, with or without the language set...
How should i write the rewrite rule in order to comply in both cases: with or without language set ?
I hope i was clear in my explication...
Thank you in advance.