apache泛解析求一.htaccess
我的需求如下:
www.a.com 直接访问网站根目录 / (即不影响www)
test1.a.com 指向 /my/test1/ 或 /my/test1/index.html
test1.a.com/other.html 指向 /my/test1/other.html
如此类推。。
PS 网上看到的这个不行:
PHP code
www.a.com 直接访问网站根目录 / (即不影响www)
test1.a.com 指向 /my/test1/ 或 /my/test1/index.html
test1.a.com/other.html 指向 /my/test1/other.html
如此类推。。
PS 网上看到的这个不行:
PHP code
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f [OR] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{HTTP_HOST} ^(.*\.)?abc.com$ RewriteCond %{REQUEST_URI} !^/company/ RewriteRule ^(.*)$ /company/$1
作者: flymorn 发布时间: 2011-04-25
PHP不怎么了解,不过好像是使用正则表达式,找到下规律……(PS:自认为废话) 帮顶下吧
作者: littleJP 发布时间: 2011-04-26