我要做的是拒绝访问wp-admin(用户可以登录),并且只允许从特定的ip访问。
我把它们放到.htaccess但是我得到500内部服务器错误:
# BEGIN Custom rules
<Directory /wp-admin>
Order deny,allow
Deny from all
Allow from x.x.x.x
</Directory>
# END Custom rules
答案 0 :(得分:0)
将以下内容放入.htaccess
文件,并将其放在wp-admin
文件夹
# BEGIN Custom rules
<LIMIT GET>
Order deny,allow
Deny from all
# whitelist IP address
Allow from x.x.x.x
</LIMIT>
# END Custom rules