环境:
win2003 sp2
ISAPI Rewrite full 破解版
想实现真正意义上的二级域名功能。
如:aaa.bbb.com 加载 www.bbb.com/aaa
实际上运行后,IE地址栏上的地址变成http://www.bbb.com/aaa了,我不想要这种效果,我想让IE地址栏还是http://aaa.bbb.com
而且如果访问http://aaa.bbb.com/user/reg.asp 就相当于访问
http://www.bbs.com/aaa/user/reg.asp 地址栏还是http://aaa.bbb.com/user/reg.asp
用ISAPI Rewrite full如何写正则?
现在用的是:
RewriteCond Host: (?!/.|www|ww)(.*).bbb.com
RewriteRule (.*) http/://www.bbb.com/$1$2 [I,R] 不行。
请各位有经验的朋友帮忙,说的尽量详细一些,谢谢!
------解决方案--------------------------------------------------------
关注此问题!有没有人可以详细的说说~
------解决方案--------------------------------------------------------
[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.