Hi guys,
I was hoping someone could give me some advice with 301 redirect. I have recently moved domains and got a redirect on my domain from the old one to the new one. This works for all of the files except ones with have a query string in the URL.
e..g
www.olddomain.com/example.php - redirect to index of new site
www.olddomain.com/example/ - redirect to index of new site
www.olddomain.com/example?id=2 - redirects to the new site but to the 404 page.
My current 301 redirect reads.
#RewriteRule ^(.*)$ "http\:\/\/www\.olddomain\.com\/$1" [R=301,L]
RewriteRule ^(.*)$ "http\:\/\/www\.newsite\.com\/" [R=301,L]
Can anyone advise me of what code to put into the htaccess file so i can redirect ALL urls WITH a query string to the index page of the new site
Thanks in advance
I was hoping someone could give me some advice with 301 redirect. I have recently moved domains and got a redirect on my domain from the old one to the new one. This works for all of the files except ones with have a query string in the URL.
e..g
www.olddomain.com/example.php - redirect to index of new site
www.olddomain.com/example/ - redirect to index of new site
www.olddomain.com/example?id=2 - redirects to the new site but to the 404 page.
My current 301 redirect reads.
#RewriteRule ^(.*)$ "http\:\/\/www\.olddomain\.com\/$1" [R=301,L]
RewriteRule ^(.*)$ "http\:\/\/www\.newsite\.com\/" [R=301,L]
Can anyone advise me of what code to put into the htaccess file so i can redirect ALL urls WITH a query string to the index page of the new site
Thanks in advance
Last edited: