Hi arober11,
Thanks for your reply. I have tried your example and cant get it to work. For eg
For example.com/test.php?id=so
Rewr
RewriteCond %{QUERY_STRING} !^a=sometext
RewriteRule .* /sometext [R=301,L]
If I type example.com/test.php?id=so
I am probably doing something wrong here. Thanks again for your help!
Cheers
Mark
Main Topics
Browse All Topics





by: arober11Posted on 2009-07-31 at 08:39:24ID: 24989814
HI
metext >> example.com/testing/somete xt metext&id2 =moretext >> example.com/testing/somete xt/moretex t ([a-zA-Z0- 9_-]+)$
For starters:
RewriteEngine on
#For: example.com/test.php >> example.com/testing
RewriteCond %{REQUEST_URI} ^/test.php$
RewriteCond %{QUERY_STRING} !^id=
RewriteRule .* /testing [R=301,L]
# For: example.com/test.php?id=so
RewriteCond %{REQUEST_URI} ^/test.php$
RewriteCond %{QUERY_STRING} ^id=([a-zA-Z0-9_-]+)$
RewriteRule .* /testing/%1 [R=301,L]
# For: example.com/test.php?id=so
RewriteCond %{REQUEST_URI} ^/test.php$
RewriteCond %{QUERY_STRING} ^id=([a-zA-Z0-9_-]+)\&id2=
RewriteRule .* /testing/%1/%2 [R=301,L]