【发布时间】:2017-07-13 12:56:43
【问题描述】:
我在 Windows 7 IIS 上使用 WordPress 进行开发。我在 WordPress 中为博客文章上传图片。图片在网站上显示正常,但一旦我启用永久链接,图片就不再起作用,以后上传的任何图片都会返回一个错误:
HTTP Error 500.50 - URL Rewrite Module Error.
The page cannot be displayed because an internal server error has occurred.
我不知道为什么会这样,这是我的web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" 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>
一旦我关闭我的永久链接并使用它的默认设置,有人知道为什么会这样吗?
【问题讨论】:
-
非常感谢这对我有帮助!到处寻找 url 重写问题