Difference between revisions of "Htaccess Deny"

From TNG_Wiki
Jump to navigation Jump to search
(added Security Related Links)
(added another example)
Line 8: Line 8:
 
Order Deny, Allow
 
Order Deny, Allow
 
Deny from env=bad_bot</pre>
 
Deny from env=bad_bot</pre>
 +
 +
ICDSoft support also provided the following as a another way to ban bots
 +
 +
 +
<syntaxhighlight lang="html4strict" enclose="div">
 +
 +
SetEnvIfNoCase User-Agent "Yahoo" badBot
 +
SetEnvIfNoCase User-Agent "bingbot" badBot
 +
SetEnvIfNoCase User-Agent "MJ12bot" badBot
 +
SetEnvIfNoCase User-Agent "Yandex" badBot
 +
SetEnvIfNoCase User-Agent "BaiDuSpider" badBot
 +
SetEnvIfNoCase User-Agent "Mail.ru" badBot
 +
Deny from env=badBot
 +
</syntaxhighlight>
 +
  
 
== References on User Agent ==
 
== References on User Agent ==

Revision as of 11:10, 6 February 2015

Note that malware or email harvesting bots will ignore the directives of the robots.txt file, you must create an entry in your .htaccess file.

The following example was provided by Gustave Dahl on User2 list 11/12/2009 11:05 PM


BrowserMatchNoCase PiplBot bad_bot
BrowserMatchNoCase MJ12bod bad_bot
Order Deny, Allow
Deny from env=bad_bot

ICDSoft support also provided the following as a another way to ban bots


SetEnvIfNoCase User-Agent "Yahoo" badBot
SetEnvIfNoCase User-Agent "bingbot" badBot
SetEnvIfNoCase User-Agent "MJ12bot" badBot
SetEnvIfNoCase User-Agent "Yandex" badBot
SetEnvIfNoCase User-Agent "BaiDuSpider" badBot
SetEnvIfNoCase User-Agent "Mail.ru" badBot
Deny from env=badBot


References on User Agent

Provided by Gustave Dahl on User2 list on 13 Nov 2009


Related links

The following provide additional security measures:

Controlling Site Access

Protecting Resources

Checking your site for Malware