Sign-up....

apache RewriteRule

现在我的apache 已经和tomcat整合好了

apache的虚拟主机的目录指向tomcat下的webapps下

并且用127.0.0.1 对应 www.mytest.com[改host文件]

现在的问题是:

我能用http://www.mytest.com/business/访问tomcat下webapps下的的bisness目录的文件

RewriteRule /business/(.*)_(.*)_(.*)\.html$ /business/index.html?action=Search&superType=$1&type=$2&keywords=$3 [PT]

也可以重写

但是我想这样的效果却不能

把http://buyer.mytest.com/business/重写成http://www.mytest.com/business/却不行

下面是我试过的:

RewriteRule ^buyer\.mytest\.com http://www.mytest.com/business/ [PT]

RewriteRule http://buyer.mytest.com http://www.mytest.com/business/ [PT]

就相当于看去象一个二级域名的样子,[当然是假的]

为什么不行,有谁知道

[582 byte] By [msdn] at [2007-8-14 9:32:30]
# 1 Re: apache RewriteRule

RewriteRule ^buyer\.mytest\.com http://www.mytest.com/business/ [PT]

RewriteRule http://buyer.mytest.com http://www.mytest.com/business/ [PT]

你用这个的时候是报什么错

binghgo at 2005-5-15 22:02:33 >

Web

All Classified