mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 01:20:24 +03:00
Update .htaccess
1. added more comments. 2. added NC Tag for making all the static assets case insensetive ("jpg" now matches "jpg" and "JPG" and so on) 3. transformed "jpe|jpeg" into "jpe?g" as its regex for the same, but shorter 4. changed line 8 from "+" to "*" to match everything, also zero times the wildcard
This commit is contained in:
parent
703addddb9
commit
965c2b243f
1 changed files with 4 additions and 2 deletions
|
@ -5,10 +5,12 @@ RewriteBase /
|
||||||
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
||||||
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
||||||
RewriteCond %{REQUEST_FILENAME} -d
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
RewriteRule .+ - [L]
|
RewriteRule .* - [L]
|
||||||
|
|
||||||
|
# if request is no valid file NOR directory
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
# if static asset do not do anything
|
# if static asset do not do anything
|
||||||
RewriteRule (.*)(css|js|html|png|jpg|jpeg|gif|bmp|ico|json|csv|otf|eot|svg|svgz|ttf|woff|woff2|ijmap|pdf|tif|map)$ - [L,R=404]
|
RewriteRule (.*)(css|js|html|png|jpe?g|gif|bmp|ico|json|csv|otf|eot|svg|svgz|ttf|woff|woff2|ijmap|pdf|tif|map)$ - [NC,L,R=404]
|
||||||
|
# everything else should be redirected to /index.html so it can be routed by it
|
||||||
RewriteRule (.*) /index.html [L]
|
RewriteRule (.*) /index.html [L]
|
||||||
|
|
Loading…
Reference in a new issue