Forum Moderators: phranque
www.example.com/forum/index.php?showtopic=2414&st=0
The last part ( &st=0 ) produces exactly the same page as...
www.example.com/forum/index.php?showtopic=2414
... and so I want to 301 redirect the first example to the second example... but ONLY if '&st=0' is present.
If...
www.example.com/forum/index.php?showtopic=2414&st=20
... is the URL, the redirect MUST NOT happen... I can't work this out, sorry. Please help :-)
Thanks.
[edited by: jdMorgan at 1:05 am (utc) on Jan. 2, 2007]
[edit reason] examplified, re-formatted [/edit]
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ h##p://www.example.com/$1 [r=301,nc]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ h##p://www.example.com/ [R=301,L]
RewriteCond %{QUERY_STRING} .
RewriteRule ^index\.php$ /this_file_does_not_exist.html? [L]
redirect 301 /exampledir/examplefile.html http://www.example.com/examplefile2.html
[edited by: Asia_Expat at 9:48 pm (utc) on Jan. 1, 2007]
This will interfere with any rule you might add to redirect your "st=0" requests.
If you have tried other rules to redirect this query, please post them so we can discuss them.
Jim