在IIS的高版本下面可以配置web.Config,在中间添加rewrite节点:
<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 url重写功能组件
http://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads
我的是32位系统选择简体中文X86的
安装好后打开IIS配置,单击你的网站,右边就看到多了个URL重写功能,随便配置个规则,回到你网站的根目录。你就发现了web.Config文件了,记事本打开后将<rewrite>**</rewrite>标签内的内容删除,将上面的内容复制过去保存即可
注意URL_MODEL 要是2 哦
至此就设置完成
IIS7没有试过,只要这个rewrite组件能装上去应该都可以吧
最佳答案