<?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 統一網址的應用]]></title> 
<author>apao &lt;apao@www.apao.idv.tw&gt;</author>
<category><![CDATA[Apache]]></category>
<pubDate>Wed, 25 Aug 2010 03:33:47 +0000</pubDate> 
<guid>https://blog.apao.idv.tw/post//</guid> 
<description>
<![CDATA[ 
	以【colorcola.com.tw】為例︰<br/><br/><span style="color: #00008B;"><span style="font-size: 120%;">一般申請網域名為 <strong>colorcola.com.tw</strong><br/>但是一般在伺服器上的的網址都會設成 <br/><strong>http://www.colorcola.com.tw</strong></span></span><br/>為了讓所有網址統一，可以在伺服器上設定以下的.htaccess<br/><br/><strong><span style="color: #DC143C;">在.htaccess上寫上︰</span></strong><br/><div class="code">RewriteEngine On&nbsp;&nbsp;<br/>RewriteCond %&#123;HTTP_HOST&#125; ^colorcola.com.tw$&nbsp;&nbsp;<br/>RewriteRule (.*) http://www.colorcola.com.tw/$1 &#91;R=301,L&#93;&nbsp;&nbsp;</div><br/><br/>這樣就可以讓只要是 <a href="http://colorcola.com.tw" target="_blank">http://colorcola.com.tw</a> 以下階層的資料<br/>自動跳成-><a href="http://www.colorcola.com.tw" target="_blank">http://www.colorcola.com.tw</a><br/><br/>例︰ <a href="http://colorcola.com.tw/01-intro.html" target="_blank">http://colorcola.com.tw/01-intro.html</a> <br/>會自動跳成-><a href="http://www.colorcola.com.tw/01-intro.html" target="_blank">http://www.colorcola.com.tw/01-intro.html</a><br/><br/>p.s. 相反的做法也可能<br/><br/><a href="attachment.php?fid=851">點擊這裡下載檔案</a><br/><br/>備註：<br/>這種用法的好處，在於<br/><a href="http://colorcola.com.tw/xxx.html(" target="_blank">http://colorcola.com.tw/xxx.html(</a>或其他存在檔案)<br/>都會自動轉成<br/><a href="http://www.colorcola.com.tw/xxx.html(" target="_blank">http://www.colorcola.com.tw/xxx.html(</a>或其他存在檔案)<br/>的方式。<br/>Tags - <a href="https://blog.apao.idv.tw/tags/.htaccess/" rel="tag">.htaccess</a> , <a href="https://blog.apao.idv.tw/tags/url/" rel="tag">url</a> , <a href="https://blog.apao.idv.tw/tags/%25E7%25B6%25B2%25E5%259F%259F%25E5%2590%258D/" rel="tag">網域名</a>
]]>
</description>
</item><item>
<link>https://blog.apao.idv.tw/post//#blogcomment</link>
<title><![CDATA[[評論] .htaccess 統一網址的應用]]></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>