Php 为什么htaccess代码使用12个输入过程?

Php 为什么htaccess代码使用12个输入过程?,php,apache,.htaccess,bots,Php,Apache,.htaccess,Bots,我已经在.htaccess文件中设置了它来阻止一些机器人,它可以工作,但使用12个条目的过程。为什么? 哪一个是正确的 SeEnvIfNoCase User-Agent "^MJ12bot" not-allowed SetEnvIfNoCase User-agent (MJ12bot) not-allowed=1 SetEnvIfNoCase User-Agent "^Mail.RU_Bot" not-allowed SetEnvIfNoCase User-agent (Mail.RU_Bot)

我已经在.htaccess文件中设置了它来阻止一些机器人,它可以工作,但使用12个条目的过程。为什么? 哪一个是正确的

SeEnvIfNoCase User-Agent "^MJ12bot" not-allowed
SetEnvIfNoCase User-agent (MJ12bot) not-allowed=1
SetEnvIfNoCase User-Agent "^Mail.RU_Bot" not-allowed
SetEnvIfNoCase User-agent (Mail.RU_Bot) not-allowed=1
SetEnvIfNoCase User-Agent "^Mail.RU" not-allowed
SetEnvIfNoCase User-Agent "^Qwantify" not-allowed
SetEnvIfNoCase User-Agent "^YandexBot" not-allowed
SetEnvIfNoCase User-Agent "^YandexMobileBot" not-allowed
SetEnvIfNoCase User-Agent "^Seznambot" not-allowed
SetEnvIfNoCase User-Agent "^Daum" not-allowed
SetEnvIfNoCase User-Agent "^DotBot" not-allowed
SetEnvIfNoCase User-Agent "^Baidu" not-allowed
SetEnvIfNoCase User-Agent "^SemrushBot" not-allowed
SetEnvIfNoCase User-Agent "^BLEXBot" not-allowed
SetEnvIfNoCase User-agent (Mail.RU_Bot) not-allowed=1
SetEnvIfNoCase User-agent (Qwantify) not-allowed=1
SetEnvIfNoCase User-agent (SeznamBot) not-allowed=1
SetEnvIfNoCase User-agent (YandexBot) not-allowed=1
SetEnvIfNoCase User-agent (YandexMobileBot) not-allowed=1
SetEnvIfNoCase User-agent (Daum) not-allowed=1
SetEnvIfNoCase User-agent (DotBot) not-allowed=1
SetEnvIfNoCase User-agent (Baidu) not-allowed=1
SetEnvIfNoCase User-agent (SemrushBot) not-allowed=1
SetEnvIfNoCase User-agent (BLEXBot) not-allowed=1


谢谢yiu,但是在这个“^Bandit”中,^如果没有像这个“Bandit”一样的“^”我可以使用它吗?它是regex,对于start
SetEnvIfNoCase属性regex[!]env variable[=value]
有人能解释为什么它使用12个静态输入过程吗?机器人程序正好是12个,在原始文件中,我可以看到它们被阻止,因为它说机器人程序有403个错误,但问题是进入过程总是12/20,这很奇怪,因为我知道进入过程仅用于php,而不是服务器命令
SeEnvIfNoCase User-Agent "^example" not-allowed
SetEnvIfNoCase User-agent (example) not-allowed=1