WordPress permalinks在iis7上重写

WordPress permalinks在iis7上重写,wordpress,url-rewriting,iis-7,permalinks,hebrew,Wordpress,Url Rewriting,Iis 7,Permalinks,Hebrew,我花了很多时间寻找解决方案,所以你是我放弃之前的最后希望:) 在本地主机iis7上,我设置了安装了重写模式的自定义永久链接 <configuration> <system.webServer> <defaultDocument> <files> <add value="index.php"/> </files> </defaultDocument>

我花了很多时间寻找解决方案,所以你是我放弃之前的最后希望:)

在本地主机iis7上,我设置了安装了重写模式的自定义永久链接

<configuration>
  <system.webServer>
    <defaultDocument>
      <files>
        <add value="index.php"/>
      </files>
    </defaultDocument>
    <rewrite>
      <rules>
            <rule name="WordPress: http://tip4u03" patternSyntax="Wildcard">
                <match url="*"/>
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                    </conditions>
                <action type="Rewrite" url="index.php"/>
            </rule></rules>
    </rewrite>
  </system.webServer>
</configuration>

它只在wwwroot目录中工作。在wwwroot目录之外,返回404模板页面。我的共享iis7服务器(VPS)上存在相同的问题。

我解决了这个问题!!! 问题不在于站点位置,而是因为permalinks是希伯来语。我在wp config文件中添加了以下条件

if (isset($_SERVER['UNENCODED_URL'])) {
    $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];
}
根据这个链接:

终于成功了