我在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.
Run Code Online (Sandbox Code Playgroud)
我不知道为什么会发生这种情况,这是我的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>
Run Code Online (Sandbox Code Playgroud)
一旦我关闭我的永久链接并使用默认它有效,有谁知道为什么这可能?
Mik*_*rko 13
图像问题是权限问题,但只是在原始图像文件或父文件夹上手动设置它是不够的.WordPress的行为是它使用IUSR将原始文件写入PHP.ini文件中定义的临时系统目录.此临时文件夹上没有IIS_IUSRS权限,因此当Windows将此文件从临时文件夹移动到应用程序的上传文件夹(最终主页)时,IIS_IUSRS只具有读取权限,因此权限不会从文件的父文件夹继承.
要解决这个问题,有两种解决方案.
- 更改临时文件夹的权限,给IIS_IUSRS写入/修改.
- 将PHP.ini文件中临时文件夹的路径更改为具有IIS_IUSRS写入/修改权限的文件夹.
以下是详细说明问题的好消息来源:http: //www.howyoudo.info/index.php/how-to-fix-windows-server-upload-file-inherit-permissions-error/
我选择将PHP.ini中的临时文件夹移动到C:\ inetpub\temp\uploads并赋予它权限.在wp-admin上传图像后,我能够从浏览器访问图像(原始图像,未调整大小),而不会出现500.50错误.
| 归档时间: |
|
| 查看次数: |
13600 次 |
| 最近记录: |