|
发表于 2008-3-10 17:23:08
|
显示全部楼层
配置会是这样的。没测试过,不保证完全正确。
作了一次Redirect后,地址栏上会有变化的。不知道是不是你要的。
<VirtualHost *:80>
ServerName www.new.com
DocumentRoot /usr/local/web/new/
DirectoryIndex index.php
RewriteEngine on
RewriteRule /work/(.?+)$ /$1 [L,R]
<Directory "/usr/local/web/new/">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName work.new.com
DocumentRoot /usr/local/web/new/work
DirectoryIndex index.php
RewriteEngine on
RewriteRule /([^/]+)/([^/]+)/([^/]+) /index.php?action=$1&$2=$3 [L]
<Directory "/usr/local/web/new/work">
AllowOverride All
Allow from All
</Directory>
</VirtualHost> |
|