第1:域名重定向到網站新域名二級目錄mulu:
根據網站代碼:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^old.com [NC,OR]
RewriteCond %{HTTP_HOST}
^www.old.com [NC]
RewriteRule ^(.*)$ http://www.new.com/mulu/$1 [L,R=301]
第二 .htaccess 設置 301的方法,老域名到新域名設置方法: RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain.com [NC,OR] RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC] RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]