diff --git a/.htaccess b/.htaccess index d6cc946a1..da9dd1792 100644 --- a/.htaccess +++ b/.htaccess @@ -28,7 +28,7 @@ RewriteRule ^(app|bootstrap|config|database|overrides|resources|routes|storage|tests)/(.*) / [L,R=301] # Prevent Direct Access To modules/vendor Folders Except Assets - RewriteRule ^(modules|vendor)/(.*)\.((?!ico|gif|jpg|jpeg|png|js|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ / [L,R=301] + RewriteRule ^(modules|vendor)/(.*)\.((?!ico|gif|jpg|jpeg|png|js\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ / [L,R=301] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d diff --git a/nginx.example.com.conf b/nginx.example.com.conf index e4270878d..96852d10d 100644 --- a/nginx.example.com.conf +++ b/nginx.example.com.conf @@ -32,7 +32,7 @@ server { } # Prevent Direct Access To modules/vendor Folders Except Assets - location ~ ^/(modules|vendor)\/(.*)\.((?!ico|gif|jpg|jpeg|png|js|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ { + location ~ ^/(modules|vendor)\/(.*)\.((?!ico|gif|jpg|jpeg|png|js\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ { deny all; }