I have a site (olddomain.com) and i'm planning to redirect it and all its pages to newdomain.com keeping the same folder structure, so that when someone clicks on olddomain.com/company/sample/ it will redirect them to newdomain.com/company/sample/ I tried using the following code in my .htaccess but it always redirect me to the homepage of the newdomain.com: Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://newdomain.com/$1 [R=301,L] What am i missing here? Thanks for the help
Thanks Nintendo, so you say it has to be something like this: Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule (.*) http://newdomain.com/$1 [R=301,L]
Yep. If you've never used mod_rewrite on your site, you can also try taking out Options +FollowSymLinks