Skip to content

Instantly share code, notes, and snippets.

@mosne
Created July 13, 2014 23:55
Show Gist options
  • Save mosne/24274b1b9a22aaa96079 to your computer and use it in GitHub Desktop.
Save mosne/24274b1b9a22aaa96079 to your computer and use it in GitHub Desktop.
Moving WordPress? How to do it right, without losing your SEO! An handy script for .htacces
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !www.newdomain.com$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]
</IfModule>
# END WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment