Web Server
更換網址 301 Redirect For Apache
1
#
JDP
3794
0
2011-6-30 14:34:35
當網站要更換網址時,可以利用修改.htaccess加入以下內容的方式來達到自動轉到新網址
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^newdomain\.com
RewriteRule ^(.*)$ [url]http://www.newdomain.com/[/url]$1 [R=301,L]
複製代碼
可用來測試是否正確設定301導向的網站
http://www.internetofficer.com/seo-tool/redirect-check/
Reference:
http://www.mcanerin.com/en/articles/301-redirect-apache.asp
http://steachs.com/archives/709
http://shachi.tw/301-moved-permanently/
倒序瀏覽
看全部
全部回復
暫無回復,快來搶沙發
回復
收藏
轉播
分享
淘帖