pwa adjustments

This commit is contained in:
2023-07-06 00:24:33 +02:00
parent 0e19b7b0d3
commit 5a7c4df70a
4 changed files with 48 additions and 19 deletions

View File

@@ -4,6 +4,10 @@ RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
# remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R] # R=301
# SPA mode
RewriteBase /
RewriteRule ^200\.html$ - [L]
@@ -11,6 +15,6 @@ RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /200.html [L]
# remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# redirect not found urls to .html files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^./]+)/?$ $1.html [QSA]