diff --git a/.htaccess b/.htaccess
index f9bd54ac74..e6c9c48545 100755
--- a/.htaccess
+++ b/.htaccess
@@ -1,10 +1,23 @@
DirectoryIndex index.php index.html
-RedirectMatch 403 \.config$
+# PROTECTED DIRECTORIES
+
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} -d
+ RewriteRule (?i)(data|api) - [F]
+
+RedirectMatch 403 (?i)/data/config\.php$
+RedirectMatch 403 (?i)/data/logs
+RedirectMatch 403 (?i)/data/cache
+RedirectMatch 403 (?i)/data/upload
+RedirectMatch 403 (?i)/application
+RedirectMatch 403 (?i)/custom
+RedirectMatch 403 (?i)/vendor
+#END PROTECTED DIRECTORIES
-RewriteEngine On
-RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
+ RewriteEngine On
+ RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
-RewriteRule reset/?$ reset.html [QSA,L]
+ RewriteRule reset/?$ reset.html [QSA,L]
\ No newline at end of file
diff --git a/api/index.html b/api/index.html
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/application/.htaccess b/application/.htaccess
deleted file mode 100644
index 2859d7f432..0000000000
--- a/application/.htaccess
+++ /dev/null
@@ -1,2 +0,0 @@
-Order Deny,Allow
-Deny from all
\ No newline at end of file