为垃圾邮件机器人制作特定的 url 响应 404 错误而不是 200
当垃圾邮件机器人尝试访问我的网站时,如何使我的网站的特定网址 (index.php?act=add) 响应 404 错误而不是 200 错误?
我不是 php 程序员,所以可能可以通过 .htaccess 文件中的指令以某种方式完成?
++++
感谢您的回答,但这没有帮助(
我需要类似 .htaccess 文件中的规则:
<Files "index.php">
Order Deny,Allow
Deny from all
</Files>
但不是使用 index.php 而是使用“index.php?act=add”。
+++ 现在它工作了。谢谢你!!!
How to make my site's specific url (index.php?act=add) to response 404 error instead of 200 when spam bots try to access it ?
I am not php programmer so may be it could be done somehow with derectives in .htaccess file ?
++++
Thank you for your answers but that did not help (
I need somthing like that rule in .htaccess file:
<Files "index.php">
Order Deny,Allow
Deny from all
</Files>
But instead of index.php to use "index.php?act=add".
+++
Now its working. Thank you!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 php(文件index.php)
using php (file index.php)
您可以使用 php 标头
或使用 htaccess
you can use php headers
or use htaccess
您可以使用 header() 函数 , 例如
You can use header() function, for example