Wordpress .htaccess文件指令无法阻止所有IP,但允许我的IP

Wordpress .htaccess文件指令无法阻止所有IP,但允许我的IP,wordpress,apache,.htaccess,mod-rewrite,Wordpress,Apache,.htaccess,Mod Rewrite,我在public\u html/下的各自目录中安装了几个wordpress站点,我想限制对public\u html/dev/wp login.php的访问。dev文件夹是该站点WordPress安装的根目录 因为我有Apache2.4.12,所以我将阻塞指令更新为新语法。。。现在是public\u html/dev/.htaccess <Files wp-login.php> Require all denied # Whitelist my IP Requ

我在
public\u html/
下的各自目录中安装了几个wordpress站点,我想限制对
public\u html/dev/wp login.php的访问。
dev
文件夹是该站点WordPress安装的根目录

因为我有Apache2.4.12,所以我将阻塞指令更新为新语法。。。现在是
public\u html/dev/.htaccess

<Files wp-login.php>
    Require all denied
    # Whitelist my IP
    Require ip xxx.xxx.xxx.xxx
</Files>

# 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
需要ip xxx.xxx.xxx.xxx
#开始WordPress
重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
#结束WordPress
此设置将阻止访问所有IP,不允许访问我的IP。删除它后,所有人都可以访问
wp login.php

这个代码本身有什么错误吗?有什么别的东西干扰它吗

当它看到
Require all denied
(或
Deny from all
)时,一切都停止了。
我已经检查了,两次和三次检查了我的IP。

我不是想说得轻率,但这确实表明你允许了错误的IP地址?这是什么版本的Apache(您的指令暗示Apache 2.2)?文档根目录中是否有其他WP站点?子目录中的WP站点是否启用mod_重写继承?如果没有,那么父
.htaccess
文件中的阻塞指令将不会被处理,但是如果是,那么父
.htaccess
文件中的前端控制器将破坏站点-所以我想没有?@user82217我检查过,它肯定是正确的IP地址。我已暂时重命名了
/public\u html/.htaccess
,以禁用任何继承的规则,但问题仍然存在。也许这是
/public\u html/dev/.htaccess
本身的一个问题,我把它放在指令中了?我试着暂时逐一注释代码的不同部分,但问题依然存在。