Forum Moderators: phranque
Example: http://www.olddomain.com/?click=45345
Now I want to 301 this domain and any possible page to my new domain. I'm using the following code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule ^(.*)$ http://www.newdomain.com [R=301,L]
Works just fine with the exception of one small glitch. The affiliate/tracking codes are passing through.
Example: http://www.olddomain.com/?click=4443 is redirecting to http://www.newdomain.com/?click=4443
I just can't figure out how to stop that. I want everything to go clean to http://www.newdomain.com.
I know it's probably something simple I'm missing, but any help would be greatly appreciated.
RewriteEngine on
#
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com [NC]
RewriteRule (.*) http://www.newdomain.c[b]om?[/b] [R=301,L]
Jim