2016-11-17 64 views
0

我在IIS中有一个WordPress站点,当我将wordpress中的永久链接设置更改为/%postname%/ i时,每篇文章中都会出现404错误。 web.config文件具有以下Wordpress IIS永久链接导致错误404

<rewrite> 
    <rules><rule name="Plesk. Wordpress redirect wpConfigRule #70e3895f-b537-474a-8e6e-f5c31e888d54" stopProcessing="true"><match url="^wp-config.php$" ignoreCase="false"/><action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden"/></rule> 
     <rule name="WordPress: http://domain.com" 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> 

其中谷歌搜索后,我发现这是正确的。 我还需要检查什么才能解决问题?

回答

0

您是否尝试过wordpress文档中的web.config文件? https://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite

一个你张贴看起来像特异性的Plesk的东西,试试这个:

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.webServer> 
<rewrite> 
<rules> 
<rule name="WordPress Rule" stopProcessing="true"> 
<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> 
+0

是的,我并没有什么 –

相关问题