简单点说,就是需要安装微软本身的url重写插件,可以使用IIS自带的web安装平台去查找安装。如果未安装这个平台,请自行百度搜索。
安装完成后,重启下IIS,在相应站点的IIS设置里会看到URL Rewrite
创建一个空的重写规则
然后在网站的根目录下,找到web.config文件打开
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>复制并替换上述内容到web.config的相应节点,重启IIS站点。
thinkphp在IIS7.5+环境下部署出现的URL重写问题解决方法
原文:http://delking.blog.51cto.com/1120375/1885289