Skip to content

Commit

Permalink
Added shortcuts via RewriteRule to .htaccess (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
nagmat84 authored Apr 13, 2022
1 parent 513014b commit 0199212
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions public/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Any request to the public folders can be served directly.
# There is no need to direct them to the front-controller.
# Hence, we take a short-cut here, [L] means last rule.
# This also avoids some unneccessary execptions and exception logging
# inside Lychee, if a non-existing file is requested.
# Also disable compression for already highly compressed media files.
RewriteRule ^(css|dist|img|installer|js|src)/ - [L]
RewriteRule ^(sym|uploads)/ - [L,E=no-gzip:1]

# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
Expand Down

0 comments on commit 0199212

Please sign in to comment.