这是我的.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
答案1
那来点好看的怎么样VirtualDocumentRoot
?
VirtualDocumentRoot /var/imvu/products/ht/clients/%-3