diff --git a/.htaccess b/.htaccess
index d01bce0a..62dcb4d6 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,10 +1,26 @@
-RewriteEngine On
+
+
+ Options -MultiViews -Indexes
+
-RewriteBase /
+ RewriteEngine On
-RewriteRule (^\.|/\.) - [F]
+ # You may need to uncomment the following line for some hosting environments,
+ # if you have installed to a subdirectory, enter the name here also.
+ #
+ # RewriteBase /
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteCond %{REQUEST_FILENAME} !-d
+ # Black list protected files
+ RewriteRule (^\.|/\.) - [F]
+ RewriteRule ^storage/.* - [F]
-RewriteRule ^.*$ index.php [L]
+ # Redirect trailing slashes if not a folder
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_URI} (.+)/$
+ RewriteRule ^ %1 [L,R=301]
+
+ # Handle front controller
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^ index.php [L]
+
diff --git a/web.config b/web.config
index 5ec190f5..c25037d0 100644
--- a/web.config
+++ b/web.config
@@ -1,34 +1,47 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+