Hi, I am a vendor in clickbank and when an affiliate sends a visitor the visitor lands on a page like this: http://mysite.com/?hop=affid Now, my index page has been dropped from the index and Google has indexed http://mysite.com/?hop=affid instead of my home page. Naturally, this doesn't rank for anything since it's my home page that has all the links pointing to it. Does anyone know how I can do a 301 redirect from http://mysite.com/?hop=affid to http://mysite.com ? I just can't seem to be able to do it and it's killed my ranking. Thanks.
If you're hosted on Linux/Apache then you can use Mod_Rewrite/.htaccess files to implement the 301 redirect by adding rewrite rules to the .htaccess in your web site's root folder as follows: If you prefer www as your canonical URL: RewriteCond %{QUERY_STRING} hop= [NC] RewriteRule (.*) http://www.mysite.com/ [R=301,L] If you prefer non-www as your canonical URL: RewriteCond %{QUERY_STRING} hop= [NC] RewriteRule (.*) http://mysite.com/ [R=301,L]
Hi, Thanks for trying to help but for some reason this doesn't work. When I go to http://mysite.com/?hop=affid after updating my .htaccess with that code, the page doesn't load. It's as if there's some endless loop there. Perhaps that code needs tweaking?