读书人

有人懂ISAPI_rewrite的吗解决办法

发布时间: 2012-03-02 14:40:28 作者: rapoo

有人懂ISAPI_rewrite的吗
Emulating host-header-based virtual sites on a single site
For example you have registered two domains www.site1.com and www.site2.com. Now you can

create two different sites using single physical site. Add the following rules to your

httpd.ini file:

[ISAPI_Rewrite]

#Fix missing slash char on folders
RewriteCond Host: (.*)
RewriteRule ([^.?]+[^.?/]) http\://$1$2/ [I,R]

#Emulate site1
RewriteCond Host: (?:www\.)?site1\.com
RewriteRule (.*) /site1$1 [I,L]

#Emulate site2
RewriteCond Host: (?:www\.)?site2\.com
RewriteRule (.*) /site2$1 [I,L]




Now just place your sites in /site1 and /site2 directories.

Or you can use more generic rules:

[ISAPI_Rewrite]

#Fix missing slash char on folders
RewriteCond Host: (.*)
RewriteRule ([^.?]+[^.?/]) http\://$1$2/ [I,R]

RewriteCond Host: (www\.)?(.+)
RewriteRule (.*) /$2$3




The directory names for sites should be like /somesite1.com, /somesite2.info, etc.


请问这里是什么意思啊
看不懂是怎么转换的

[解决办法]
你想要问什么问题。写出你的问题就行了
[解决办法]
这些是正则式,建议去看看关于linux下正则式的相关资料。
好像apache 的document里面也有点,但是好像不是太全。

读书人网 >Apache

热点推荐