Skip to content

Commit

Permalink
core(app): add .htacces config to deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Hermann committed Nov 14, 2024
1 parent 767b2dd commit 75a6a9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "biome lint --write src",
"format": "biome format --write src"
"format": "biome format --write src",
"postbuild": "cp src/.htaccess dist/"
},
"private": true,
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions src/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<IfModule mod_rewrite.c>
RewriteEngine On # Redirection of requests to index.html RewriteCond
%{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] RewriteCond
%{DOCUMENT_ROOT}%{REQUEST_URI} -d RewriteRule ^.*$ - [NC,L] # Redirect all
non-file routes to index.html RewriteRule ^(?!.*\.).*$ index.html [NC,L]
</IfModule>

0 comments on commit 75a6a9a

Please sign in to comment.