我在 public_html/
下的各自目录中安装了几个wordpress站点,我想限制对 public_html/dev/wp-login.php
的访问 . dev
文件夹是该站点的WordPress安装的根目录 .
由于我有Apache 2.4.12,我将阻止指令更新为新语法...现在是 public_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
此设置将 block access to all IPs, 不允许我的 . 删除它会让所有人都可以访问 wp-login.php
.
这段代码本身有什么问题吗?还有其他事情干扰它吗?
它看到的时刻 Require all denied
(或 Deny from all
)一切都停止了 . 我检查过,检查了我的IP,然后进行了两次和三次检查 .