不同的Apache版本允许,拒绝或需要.htaccess
当我们想阻止机器人,垃圾邮件引用者使用.htaccess文件,一些网站使用下面的代码语法: Order allow,deny Allow from all Deny from env=spambot 但是有些网站告诉我们,我们需要为不同的Apache版本使用不同的代码: #For Apache 2.2 <IfModule !mod_authz_core.c> <IfModule mod_authz_host.c> Order allow,deny Allow from all Deny from env=spambot </IfModule> </IfModule> # For Apache 2.4 <IfModule mod_authz_core.c> <RequireAll> Require all granted Require not env spambot </RequireAll> </IfModule> 现在我想要哪个锥体是正确的或两者都是正确的?