Mod-Rewrite
子域重定向到文件
這是我的htaccess:
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+?)\.imvu-e\.com$ RewriteCond /var/imvu/products/ht/clients/%1/ -d RewriteRule ^(.+) %{HTTP_HOST}$1 RewriteRule ^(?:www\.)?([^.]+?)\.imvu-e\.com/(.*) /var/www/imvu/products/ht/clients/$1/$2 [L]
我想
anything.imvu-e.com
重定向到文件/var/imvu/products/ht/clients/anything/
因此
http://anything.imvu-e.com/woot.php?var=4
去/var/imvu/products/ht/clients/anything/woot.php
發送它var=4
現在訪問它的方式是
http://www.imvu-e.com/products/ht/clients/anything/woot.php?var=4
換個不錯的怎麼樣
VirtualDocumentRoot
?VirtualDocumentRoot /var/imvu/products/ht/clients/%-3