Skip to content

Commit 23e0282

Browse files
committed
fix: htaccess rewrite rule
1 parent ad2f8ba commit 23e0282

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

static/.htaccess

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
RewriteEngine On
33
RewriteBase /
44

5-
# Redirect all requests to index.html except for actual files and directories
5+
# If the request is not for an actual file or directory
66
RewriteCond %{REQUEST_FILENAME} !-f
77
RewriteCond %{REQUEST_FILENAME} !-d
8-
RewriteRule ^ index.html [L]
8+
9+
# Append .html to the request if it's missing
10+
RewriteCond %{REQUEST_URI} !\.html$
11+
RewriteRule ^(.+)$ $1.html [L]
912
</IfModule>

0 commit comments

Comments
 (0)