apache的Rewrite轉址瓶頸 - Linux

By Michael
at 2013-12-06T12:36
at 2013-12-06T12:36
Table of Contents
因為當初申請了兩個 www.abc.com 跟www.abc.com.tw
但是想要漸漸淘汰掉 www.abc.com.tw
所以要設定只要是www.abc.com.tw/xxxxxx
連進來的通通轉址成 www.abc.com/xxxxxx
想請教一下這樣改有沒有問題
有開啟rewrite的mod跟載入
在httpd的httpd.conf裡面設定如下
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.abc.com.tw [NC]
RewriteRule ^(.*)$ http://www.abc.com $1 [L]
順便請教一下若是想要改https的連線也一樣會從
.tw自動轉址成沒有.tw的話該怎麼設定
感謝
--
◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢
◤ ☆ 愛 情 限 時 專 送 ◤
◢ ★ ☆ ◢
◤ 我 找 不 到 多 餘 的 話 來 跟 妳 甜 言 蜜 語 , ◤
◢ ★我 只 想 簡 簡 單 單 的 一 直 想 著 陪 伴 妳 ! ◢
◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤
--
但是想要漸漸淘汰掉 www.abc.com.tw
所以要設定只要是www.abc.com.tw/xxxxxx
連進來的通通轉址成 www.abc.com/xxxxxx
想請教一下這樣改有沒有問題
有開啟rewrite的mod跟載入
在httpd的httpd.conf裡面設定如下
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.abc.com.tw [NC]
RewriteRule ^(.*)$ http://www.abc.com $1 [L]
順便請教一下若是想要改https的連線也一樣會從
.tw自動轉址成沒有.tw的話該怎麼設定
感謝
--
◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢
◤ ☆ 愛 情 限 時 專 送 ◤
◢ ★ ☆ ◢
◤ 我 找 不 到 多 餘 的 話 來 跟 妳 甜 言 蜜 語 , ◤
◢ ★我 只 想 簡 簡 單 單 的 一 直 想 著 陪 伴 妳 ! ◢
◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤ ◢◤
--
Tags:
Linux
All Comments
Related Posts
筆電內建喇叭沒有聲音

By Caitlin
at 2013-12-04T20:42
at 2013-12-04T20:42
Ubuntu 安裝Apt套件再VM上

By Joe
at 2013-12-03T21:10
at 2013-12-03T21:10
關於nachos安裝

By Mary
at 2013-12-03T11:54
at 2013-12-03T11:54
awk

By Annie
at 2013-12-02T21:57
at 2013-12-02T21:57
詭異的檔案 /sbin/syslogd

By Necoo
at 2013-12-02T15:09
at 2013-12-02T15:09