2020-01-30 20:51:38 +03:00
|
|
|
RewriteEngine on
|
2020-01-30 22:49:46 +03:00
|
|
|
RewriteBase /
|
|
|
|
|
|
|
|
# do not do anything for already existing files
|
|
|
|
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
|
|
|
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
|
|
|
RewriteCond %{REQUEST_FILENAME} -d
|
2020-01-31 03:27:13 +03:00
|
|
|
RewriteRule .* - [L]
|
2020-01-30 22:49:46 +03:00
|
|
|
|
2020-01-31 03:27:13 +03:00
|
|
|
# if request is no valid file NOR directory
|
2020-01-30 20:51:38 +03:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
2020-01-30 22:49:46 +03:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
# if static asset do not do anything
|
2020-01-31 03:27:13 +03:00
|
|
|
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
|
2020-01-30 22:49:46 +03:00
|
|
|
RewriteRule (.*) /index.html [L]
|