通过 .htaccess 禁止访问 wp-comments-post.php 防垃圾评论

前提:Comment Ajax 用户,否则的话妥妥的什么都不能提交

效果预览:https://rainiv.com/wp-comments-post.php

然后垃圾评论就被挡住了。

很简单,加入这么一段:

<Files wp-comments-post.php>
Require all denied
</Files>

Nginx 的我不会。

技术支持:Google、小新。

通过 .htaccess 禁止访问 wp-comments-post.php 防垃圾评论 有 8 条评论

  1. 这样不会挡住正常评论嘛_(:з」∠)_

    回复给 Ovear
  2. 卧槽,真的不会也。。神奇。。

    回复给 Ovear
  3. nginx版本

    location = /wp-comments-post.php {
    return 403;
    }

    回复给 Ovear

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注