diff --git a/.htaccess b/.htaccess
index 5c061d1a4..17ead4692 100755
--- a/.htaccess
+++ b/.htaccess
@@ -3,23 +3,20 @@
IndexIgnore */*
-# Deny access to files starting with dot
-
- Order allow,deny
- Deny from all
-
+# Deny access to files starting with a dot (e.g. .htaccess, .git)
+
+ Require all denied
+
-# Deny access to log, sql, htaccess ecc..
-
- Order allow,deny
- Deny from all
-
+# Deny access to certain file types like log, sql, htaccess, etc.
+
+ Require all denied
+
-# Deny access to VERSION, REVISION and config file
-
- Order allow,deny
- Deny from all
-
+# Deny access to VERSION, REVISION, LICENSE, and config files
+
+ Require all denied
+
# Disable indexing of php, html, htm, pdf files
ServerSignature Off
@@ -73,10 +70,15 @@ ServerSignature Off
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})
- # Block visitors referred from indicated domains
- SetEnvIfNoCase ^User-Agent$ .*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures) HTTP_SAFE_BADBOT
- SetEnvIfNoCase ^User-Agent$ .*(libwww-perl|aesop_com_spiderman) HTTP_SAFE_BADBOT
- Deny from env=HTTP_SAFE_BADBOT
+ # Set an environment variable for bad bots using user-agent patterns
+ SetEnvIfNoCase User-Agent ".*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures).*" HTTP_SAFE_BADBOT
+ SetEnvIfNoCase User-Agent ".*(libwww-perl|aesop_com_spiderman).*" HTTP_SAFE_BADBOT
+
+ # Deny access to requests from this environment variable
+
+ Require all granted
+ Require not env HTTP_SAFE_BADBOT
+
# Compress text, html, javascript, css, ecc...