【发布时间】:2017-03-23 03:54:57
【问题描述】:
我安装的 WordPress 有一个包含许多 XML 文件的目录。直到今天早上 - 这些文件都可以通过浏览器访问(我可以直接浏览它们)。但是现在 - 尝试直接从浏览器调用它们会返回 404 错误。
我很困惑,因为什么都不应该改变。我假设这很可能是 .htaccess 问题?
这是我的 htaccess:
<Files xmlrpc.php>
<IfModule !mod_authz_core.c>
order deny,allow
deny from all
allow from xx.xx.xx.xx
allow from xx.xx.xx.xx
</IfModule>
<IfModule mod_authz_core.c>
Require ip xx.xx.xx.xx xx.xx.xx.xx
</IfModule>
</Files>
# END GOTMLS Patch to Block XMLRPC Access
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
(注意 - 隐藏的相关 IP 地址)
我错过了什么?
【问题讨论】:
标签: xml wordpress apache .htaccess