Support » How-To and Troubleshooting » 301 to new domain and server

301 to new domain and server

  • Hi, I am trying to redirect an entire site to new domain and server. I am using the http://example.com/wp/sample-post or simply http://example.com/sample-post (both apply equally) structure. I added this to .htaccess
    here is the .htaccess rule

    # 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]
    RewriteEngine on
    RewriteRule (.*) http://www.example.com.br/$1 [R=301,L]
    # END WordPress

    It works for both http://example.com/wp or example.com, but when it comes to /sample-post I get a 404 error message.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘301 to new domain and server’ is closed to new replies.