From 3dca2f9683e90f9cf3398874440d8c60ad6ced48 Mon Sep 17 00:00:00 2001 From: argirok Date: Tue, 2 Aug 2022 17:16:46 +0300 Subject: [PATCH] add .htaccess file --- angular.json | 3 ++- src/.htaccess | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/.htaccess diff --git a/angular.json b/angular.json index defaa8e..64d1b25 100644 --- a/angular.json +++ b/angular.json @@ -44,7 +44,8 @@ "assets": [ "src/assets", "src/robots.txt", - "src/sitemap.xml" + "src/sitemap.xml", + "src/.htaccess" ], "styles": [ "src/styles.css", diff --git a/src/.htaccess b/src/.htaccess new file mode 100644 index 0000000..2b26651 --- /dev/null +++ b/src/.htaccess @@ -0,0 +1,10 @@ +RewriteEngine On + # If an existing asset or directory is requested go to it as it is + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d + RewriteRule ^ - [L] + + # If the requested resource doesn't exist, use index.html +RewriteRule ^ ./index.html + +