I have WordPress multisite. I want to redirect it to new domain. How I do it?
redirect .old.com to .new.net
Thanks for respone ;)
*I have copy all file and database from old.com to new.com
Add this to the htaccess file in your document root, above any rules that may already be there:
RewriteEngine On
RewriteCond %{HTTP_HOST} old\.com$ [NC]
RewriteRule ^(.*)$ http://new.com/$1 [L,R=301]
You have to use mod_rewrite because wordpress uses it to route everything to its index.php
using mod_rewrite, and mod_alias directives don't always play nicely with mod_rewrite (e.g. Redirect
vs RewriteRule
).