Forum Moderators: phranque
http://www.example.com">Example.com
http://www.example.com/index.php">Click
or
http://www.example.com/index.php?page=1">Visit
the first two generate a 404 error from my site. But for some reason www.example.com/index.php?page=1 shows up just fine even though there is the ">Visit attached to the end of the query string.
I've tried contacting the webmasters but have had no joy on most occasions. Does anyone know how to make:
http://www.example.com">Example.com
http://www.example.com/index.php">Click
http://www.example.com/index.php?page=1">Visit
301 to:
http://www.example.com
http://www.example.com/index.php
http://www.example.com/index.php?page=1
Any assistance would be appreciated.
Thanks
Mike
In any case, you could probably try a generic rule, assuming you don't have any genuine URLs with quotes in them:
RewriteRule ^(.*)" $1 [R=301,L]
You'll need something a bit more complex for the URLs with query strings, I imagine. And i'm sure someone else can recommend a tidier/more efficient rule than mine!