[.htaccess] 跳轉到新主機

2017-09-13

最近幫客戶轉機器用到紀錄一下..

feather-34999_1280

不帶參數直接跳轉:

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

帶入網址後面的資料跳轉

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


reference:

https://stackoverflow.com/questions/1945568/htaccess-redirect-all-pages-to-new-domain


當麻許的超技八 2014 | Donma Hsu Design.