301 redirect not working through .htaccess

I found this little trick http://css-tricks.com/snippets/htaccess/301-redirects/ to redirect my old WordPress domain to my new domain with the path included. I run a test on my local copy and everything works fine. When I log in to the cpanel of the old domain and try it though it gives me some bad results.

Here is the code I used for both my local and live copy …

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Redirect 301 / http://newsite.com/

Here’s what the results look like http://www.cuponsmercado.com.br/lojas/. It looks to be calling the new domain (based on the Google Chrome status at the bottom left) but it just shows the old domain with broken HTML/CSS. Any Ideas?

2 Answers
2

Replace Redirect 301 / http://newsite.com/ by RewriteRule ^(.*)$ http://newsite.com/ [L,R=301]

Leave a Comment