<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mod_rewrite on 小惡魔 - AppleBOY</title><link>https://blog.wu-boy.com/tags/mod_rewrite/</link><description>Recent content in Mod_rewrite on 小惡魔 - AppleBOY</description><generator>Hugo</generator><language>en-us</language><managingEditor>appleboy.tw@gmail.com (Appleboy)</managingEditor><webMaster>appleboy.tw@gmail.com (Appleboy)</webMaster><lastBuildDate>Sun, 17 Feb 2008 15:48:10 +0000</lastBuildDate><atom:link href="https://blog.wu-boy.com/tags/mod_rewrite/feed.xml" rel="self" type="application/rss+xml"/><item><title>[Apache] mod_rewrite 進階用法，網域 redirect</title><link>https://blog.wu-boy.com/2008/02/apache-mod_rewrite-%E9%80%B2%E9%9A%8E%E7%94%A8%E6%B3%95%EF%BC%8C%E7%B6%B2%E5%9F%9F-redirect/</link><pubDate>Sun, 17 Feb 2008 15:48:10 +0000</pubDate><author>appleboy.tw@gmail.com (Appleboy)</author><guid>https://blog.wu-boy.com/2008/02/apache-mod_rewrite-%E9%80%B2%E9%9A%8E%E7%94%A8%E6%B3%95%EF%BC%8C%E7%B6%B2%E5%9F%9F-redirect/</guid><description>&lt;p&gt;我對 mod_rewrite 的技術相當有興趣，最近又有人在 ptt Linux 版上問到這相關的問題，如下&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;我用的是虛擬主機 (web hosting) 他的管理是這樣的, 不論代管哪個domain 一律都是對應到 /home/user/public_html 這個目錄下 也就是說, 1.com 跟 2.com 都會對到 ~/public_html 問題是: –&amp;gt; 我希望有人輸入 “1.com” 時, 就是讀 ~/public_html/data1 –&amp;gt; 有人讀 “2.com” 時, 就是讀 ~/public_html/data2 當然目前如果都不做設定, 那就是要用 http;//1.com/data1/ 跟 http;//2.com/data2/ 才能答成相同功能. 請問 .htaccess 有辦法改寫這樣的狀況嗎.&lt;/p&gt;
&lt;/blockquote&gt;</description></item></channel></rss>