Chinaunix
标题:
设置 apache 转发规则时的问题
[打印本页]
作者:
mercuryer
时间:
2008-07-07 16:42
标题:
设置 apache 转发规则时的问题
刚才一客户要求对域名设置两个别名,我作了如下设置:
RewriteRule ^/(.*)$ http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/cheuknang.com/cheuknang.com/VirtualHostRoot/$1 [L,P]
RewriteRule ^webmail$
http://webmail.localhost.com/webmail/
$1 [L,P]
RewriteRule ^cgi-bin2$
http://webmail.localhost.com/cgi-bin2/
$1 [L,P]
问题是,第一行的规则将下面两行的设置覆盖掉了,应该怎么改?
作者:
mercuryer
时间:
2008-07-07 17:01
自己解决了,调整了下顺序:
RewriteRule ^/webmail
http://webmail.localhost.com/webmail/
RewriteRule ^/cgi-bin2
http://webmail.localhost.com/cgi-bin2/
RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/cheuknang.com/cheuknang.com/VirtualHostRoot/$1 [L,P]
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2