Difference between revisions of "Htaccess Deny"
Jump to navigation
Jump to search
(added another example) |
(Text replacement - "<syntaxhighlight lang="html4strict" enclose="div">" to "<syntaxhighlight lang="html4strict">") |
||
(2 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
− | <syntaxhighlight lang="html4strict | + | <syntaxhighlight lang="html4strict"> |
SetEnvIfNoCase User-Agent "Yahoo" badBot | SetEnvIfNoCase User-Agent "Yahoo" badBot | ||
Line 24: | Line 24: | ||
− | == References | + | == References == |
Provided by Gustave Dahl on User2 list on 13 Nov 2009 | Provided by Gustave Dahl on User2 list on 13 Nov 2009 | ||
Line 31: | Line 31: | ||
* [http://www.useragentstring.com/pages/useragentstring.php List of User Agent Strings] | * [http://www.useragentstring.com/pages/useragentstring.php List of User Agent Strings] | ||
+ | See also: | ||
+ | |||
+ | * [http://blamcast.net/articles/block-bots-hotlinking-ban-ip-htaccess How To Block Bots, Ban IP Addresses With .htaccess] | ||
+ | |||
+ | * [http://www.inmotionhosting.com/support/website/security/block-unwanted-users-from-your-site-using-htaccess Block unwanted users from your site using .htaccess] | ||
== Related links == | == Related links == |
Latest revision as of 16:54, 5 October 2023
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
Provided by Gustave Dahl on User2 list on 13 Nov 2009
See also:
Related links
The following provide additional security measures:
Controlling Site Access
Protecting Resources
- Permissions Explained
- Database User
- Move your configuration files
- Protecting images and files from external access
- Move your backup files
- Move your gedcom files
- Overlaid Subroot how to recover from subroot.php overlay
- Prevent Directory Listing
- Protecting access log