在关闭我的帖子之前,我已经看过我发现的每个答案,但无法解决我的问题。 在这种情况下,我想使我的网站只能使用 .htaccess从一个ip访问,就像在Apache 2.2中一样。。
这是我的代码:
<Limit GET POST PUT>
Require all denied
Require ip xx.xx.xx.xx
</Limit>
# 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
现在,我正在尝试使用apache 2.4在 ISPConfig上实现它。每当我为我的ISPConfig地址网站更改“ xx.xx.xx.xx”地址时,都可以正常工作,但是可以从任何地方访问,因此我尝试删除 require ip ...。然后我的网站显示了ispconfig的默认值-“它起作用了!”。 另外,当我尝试使用 require ip 时,这仍然不起作用...