Forum Moderators: phranque
Here is the original post...
I have an Invision installation that I have modified to be search engine friendly. However, there is one particular dupe content issue I can figure a way around and I'm sure there must be a way to do it with htaccess. I just can't figure it out though so I hope someone will help me.
Below is an example of a topic URL...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.
The original thread is here...
[webmasterworld.com...]
The last line of the htaccess file was in place to produce a 404 error as Google was requesting pages that did not exist and my server was producing the homepage for those requests (bad dupe issues) but I'm pretty sure those requests have stopped now so I will remove the last line of that htaccess file, hopefully making it easier to find a solution to my original post.
My htaccess will now look like this...
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]
I'd be so very grateful if my question in the first post could be answered because I've been struggling with it for ages.
[edited by: Asia_Expat at 4:15 am (utc) on Mar. 8, 2007]