在Windows 2008Server R2 IIS7 服务器中隐藏index.phpd,只需要在网站根目录下面建一个web.config文件,里面的配置内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="WPurls" enabled="true" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
保存即可!
具体信息查看这篇文章 https://wordpress.org/support/topic/removing-indexphp-in-permalinks-using-iis-8/