<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[A.PAO designSTUDIO BLOG]]></title> 
<link>https://blog.apao.idv.tw/index.php</link> 
<description><![CDATA[A.PAO designSTUDIO 阿保工作室]]></description> 
<language>zh-tw</language> 
<copyright><![CDATA[A.PAO designSTUDIO BLOG]]></copyright>
<item>
<link>https://blog.apao.idv.tw/post//</link>
<title><![CDATA[.htaccess 301轉向應用]]></title> 
<author>apao &lt;apao@www.apao.idv.tw&gt;</author>
<category><![CDATA[Apache]]></category>
<pubDate>Mon, 29 Aug 2011 15:28:21 +0000</pubDate> 
<guid>https://blog.apao.idv.tw/post//</guid> 
<description>
<![CDATA[ 
	以下是彌補Synology伺服器上，以NAS作為基盤稍嫌不完美的地方...<br/><br/><span style="color: #DC143C;"><strong>先決設定條件1.以下用兩個網域名與網址為例子：</strong></span><br/>主機 <a href="http://ftp.apao.idv.tw" target="_blank">http://xxx.xxx.xxx.xxx/</a><br/>┣ <a href="http://www.taiwanplant.org.tw/" target="_blank">http://www.taiwanplant.org.tw/</a> (虛擬主機<a href="http://ftp.apao.idv.tw/TNPS" target="_blank">http://xxx.xxx.xxx.xxx/AAA/</a>)<br/>┗ <a href="http://www.fa-hua.com.tw/" target="_blank">http://www.fa-hua.com.tw/</a> (虛擬主機<a href="http://ftp.apao.idv.tw/Web-FaHwa-f" target="_blank">http://xxx.xxx.xxx.xxx/BBB/</a>)<br/><br/><span style="color: #DC143C;"><strong>先決設定條件2.在網域名管理設定中設定為[他管]</strong></span><br/>在A記錄中已設有[www]與[]<br/><br/><a href="https://blog.apao.idv.tw/attachment.php?fid=1234" target="_blank"><img src="https://blog.apao.idv.tw/attachment.php?fid=1234" class="insertimage" alt="點擊在新視窗中瀏覽此圖片" title="點擊在新視窗中瀏覽此圖片" border="0" width="540"/></a><br/><br/><span style="color: #DC143C;"><strong>例1：/AAA/內的所有位置，導向虛擬主機 RUL: <a href="http://www.taiwanplant.org.tw/" target="_blank">http://www.taiwanplant.org.tw/</a></strong></span><br/><br/>為了將虛擬主機上的階層徹底消失，轉向 <a href="http://www.taiwanplant.org.tw/" target="_blank">http://www.taiwanplant.org.tw/</a>的做法：<br/><span style="color: #DC143C;"><strong>於.htaccess上寫上：</strong></span><br/>Redirect permanent <u><span style="color: #D2691E;">/AAA/</span></u> <u><span style="color: #D2691E;">http://www.taiwanplant.org.tw/</span></u><br/><br/>放置位置：<br/><a href="http://ftp.apao.idv.tw/TNPS" target="_blank">http://xxx.xxx.xxx.xxx/AAA/</a><br/><br/><a href="https://blog.apao.idv.tw/attachment.php?fid=1214" target="_blank"><img src="https://blog.apao.idv.tw/attachment.php?fid=1214" class="insertimage" alt="點擊在新視窗中瀏覽此圖片" title="點擊在新視窗中瀏覽此圖片" border="0" width="540"/></a><br/><br/><span style="color: #DC143C;"><strong>例2：<a href="http://fa-hua.com.tw" target="_blank">http://fa-hua.com.tw</a> 導向虛擬主機RUL: <a href="http://www.fa-hua.com.tw" target="_blank">http://www.fa-hua.com.tw</a></strong></span><br/><br/>如果不想在[虛擬主機]上加上 <a href="http://fa-hua.com.tw/" target="_blank">http://fa-hua.com.tw/</a>部份 ，又能出現網站內容的話，<br/>善加利用 .htaccess 301的特性，就能增加Synology虛擬主機的數目(現階段為 30/2個)=<br/>達到<span style="color: #DC143C;"><strong>2倍</strong></span>的數量(30個)<br/>參考 <a href="http://www.synology.com/products/spec.php?product_name=RS411&lang=cht#p_submenu" target="_blank">Synology RS411</a> (SOHO等級)<br/><br/><span style="color: #DC143C;"><strong>於.htaccess上寫上：</strong></span><br/><div class="code">RewriteEngine On<br/>RewriteCond %&#123;HTTP_HOST&#125; ^&#91;u&#93;&#91;color=#D2691E&#93;fa-hua.com.tw&#91;/color&#93;&#91;/u&#93;$&nbsp;&nbsp;<br/>RewriteRule (.*) &#91;u&#93;&#91;color=#D2691E&#93;http://www.fa-hua.com.tw/&#91;/color&#93;&#91;/u&#93;$1 &#91;R=301,L&#93; </div><br/><br/>放置位置：<br/><a href="http://ftp.apao.idv.tw" target="_blank">http://xxx.xxx.xxx.xxx/</a><br/><br/>備註：<br/>下底線為<u><span style="color: #D2691E;">網域名與網址置換的位置</span></u><br/>Tags - <a href="https://blog.apao.idv.tw/tags/.htaccess/" rel="tag">.htaccess</a> , <a href="https://blog.apao.idv.tw/tags/301%25E8%25BD%2589%25E5%2590%2591%25E6%2587%2589%25E7%2594%25A8/" rel="tag">301轉向應用</a>
]]>
</description>
</item><item>
<link>https://blog.apao.idv.tw/post//#blogcomment</link>
<title><![CDATA[[評論] .htaccess 301轉向應用]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[評論]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://blog.apao.idv.tw/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>