301 redirect to new domain
-
Hi
I move my website to new host and use a new domain name, and the old domain also point to new host.
I add this in .htaccess# BEGIN WordPress RewriteEngine On RewriteCond %{HTTP_HOST} ^www.oldsite.com RewriteRule (.*) http://www.newsite.com/$1 [R=301,L] # END WordPress
It’s not work so well, http://www.oldsite.com did redirect to http://www.newsite.com, but http://www.oldsite.com/* sitll http://www.oldsite.com/* with right page.
I think maybe the code should be
# BEGIN WordPress RewriteEngine On RewriteCond %{HTTP_HOST} ^www.oldsite.com RewriteRule (.*) http://www.newsite.com/$1 [R=301,L] # END WordPress
But it would be a 500 internal server error.
Last time I got this error was enable Wordfence’s Falcon Engine and solved by add these codes in .htaccess from their docs.
And change file access to 404 for solved this issue.
Did those affect the 301 could not work fine?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘301 redirect to new domain’ is closed to new replies.