mirror of
https://github.com/miggymofongo/asteroid.git
synced 2024-12-25 01:19:41 +00:00
22 lines
715 B
ApacheConf
22 lines
715 B
ApacheConf
<IfModule mod_rewrite.c>
|
|
RewriteEngine On
|
|
RewriteBase /
|
|
|
|
# Ensure that static files like .js, .css, and service worker are not affected by rewrite rules
|
|
RewriteCond %{REQUEST_FILENAME} -f
|
|
RewriteRule \.(js|css|png|jpg|jpeg|gif|svg|ico|json|map)$ - [L]
|
|
|
|
# Ensure service worker is served from the /dist/ folder
|
|
RewriteRule ^dist/sw\.js$ - [L]
|
|
|
|
# For Single Page Application (SPA) routing
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteRule . /index.html [L]
|
|
</IfModule>
|
|
|
|
# Add the correct MIME type for .js and .json files
|
|
<IfModule mod_mime.c>
|
|
AddType application/javascript .js
|
|
AddType application/manifest+json .json
|
|
</IfModule>
|