我正在尝试阻止除我的216.21.162.xxx以外的任何IP对wp-admin页面和wp-login.php的所有请求
我的.htaccess文件如下所示:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^216.21.162.xxx$
RewriteRule ^(.*)$ – [R=403,L]
<Files xmlrpc.php>
order deny,allow
deny from all
</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地址列入白名单?
谢谢