如何将不需要的IP锁定在.htaccess中?

发布于 2025-02-06 04:02:27 字数 356 浏览 2 评论 0原文

在大多数情况下,.htacess似乎从我的网站上锁定了不需要的访客。 但是有些坏男孩能够穿透我的.htacess保护。 例子: 坏男孩的IP 46.161.11.xx。 因此,我写入了.htaccess文件:

Require not ip 46.161.11.

但这无济于事。 因此,我将其更改为:

RewriteCond %{REMOTE_ADDR} ^46\.161\.11\.([1-9]?\d|[12]\d\d)$ [NC]
RewriteRule ^.* - [F,L]

但这也无济于事。

Apache中有更有效的IP锁吗? 提前提示您的提示。

In most cases, the .htacess seems to lock out unwanted visitors from my site.
But some bad boys are able to penetrate my .htacess protection.
Example:
The bad boy is has the IP 46.161.11.xx .
So I wrote into the .htaccess file:

Require not ip 46.161.11.

But this did not help.
So I changed it to:

RewriteCond %{REMOTE_ADDR} ^46\.161\.11\.([1-9]?\d|[12]\d\d)$ [NC]
RewriteRule ^.* - [F,L]

But this does not help, too.

Is there a more effective IP lock in Apache?
Thx in advance for your hints.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紫南 2025-02-13 04:02:27

这似乎是我的解决方案:

    RewriteCond %{REMOTE_HOST} 46\.161\.11\.
    RewriteRule .* - [F,L]

This seems to be my solution:

    RewriteCond %{REMOTE_HOST} 46\.161\.11\.
    RewriteRule .* - [F,L]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文