Forum Moderators: phranque
I have been reading / testing / pulling hair for hours and cannot get this simple thing to work...
We've taken over an old site that had an affiliate program. Google Sitemaps is telling us there have been several 404s to www.oursite.com/default.asp?AffID=#### (default.asp does not exist any more)- I would like to redirect these to www.oursite.com/newaffiliate-signup/
I've tried everything and can almost get it to work, but usually get the?AffID=### appended to the new url.
This was the closest thing I could find that resembled our situation, but it does not work at all:
RewriteRule ^default.asp?AffID=(.*)$ /newaffiliate-signup/ [L,R=301]
What am I doing wrong?
Thanks in advance.
RewriteCond %{QUERY_STRING} &?AffID=[^&]* [NC]
RewriteRule ^default\.asp$ http://www.example.com/newaffiliate-signup[b]/?[/b] [R=301,L]
I'm not sure about redirecting to the aff signup page, though. You may end up redirecting visitors who follow an affiliate link to the signup page. If that's not what you want, just change the substitution URL.
Jim