2013-04-07 207 views

回答

2

在舊的子域的域像創建.htaccess

RewriteEngine on 
RewriteRule ^(.*)$ http://somsub.newdomain.com/$1 [R=301,L] 

或者,對於特定域的所有子域,規則是:

RewriteCond %{HTTP_HOST} ^([^.]+\.){0,1}olddomain\.com [NC] 
RewriteRule ^(.*)$ http://{%1}newdomain.com/$1 [R=301,L] 
+1

完美...三江源! – 2013-04-08 10:40:40

+0

沒問題! ^^很高興工作! – Jon 2013-04-08 10:41:27