iis7 用url write 模块实现泛解析 二级域名重写??
怎么实现?
二级域名重写
要求是
1.www.site.com/ccc都重写到www.site.com/index.php/ccc
2.ccc.site.com重写到ccc.site.com/index.php/ccc
我如下写的 1实现了 但是2怎么都有问题。不知道怎么办 求助
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webserver> <rewrite> <rules> <clear></clear> <rule name="重写规则1 对于 域名泛解析" stopprocessing="true"> <match url=".*"></match> <conditions logicalgrouping="MatchAll" trackallcaptures="false"> <add input="{REQUEST_FILENAME}" matchtype="IsFile" negate="true"></add> <add input="{HTTP_HOST}" pattern="([^.www]+)\.site\.com"></add> </conditions> <action type="Rewrite" url="index.php/{C:1}" appendquerystring="true" logrewrittenurl="true"></action> </rule> <rule name="Imported Rule 1"> <match url="(.*)$" ignorecase="false"></match> <conditions logicalgrouping="MatchAny" trackallcaptures="false"> <add input="{REQUEST_FILENAME}" matchtype="IsFile" negate="true"></add> </conditions> <action type="Rewrite" url="index.php/{R:1}" appendquerystring="true" logrewrittenurl="true"></action> </rule> </rules> <rewritemaps> <rewritemap name="域名泛解析"></rewritemap> </rewritemaps> </rewrite> <caching> <profiles> <remove extension=".html"></remove> <add extension=".html" policy="DisableCache" kernelcachepolicy="DontCache" duration="00:00:30"></add> </profiles> </caching> </system.webserver></configuration>