From b75a08506fea2496950e634f26c83266dff2eb53 Mon Sep 17 00:00:00 2001 From: argirok Date: Tue, 2 Aug 2022 17:06:31 +0300 Subject: [PATCH] Add .htaccess file, configure it in angular.json --- 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 233f5ab..8c96c45 100644 --- a/angular.json +++ b/angular.json @@ -43,7 +43,8 @@ "tsConfig": "src/tsconfig.app.json", "assets": [ "src/assets", - "src/robots.txt" + "src/robots.txt", + "src/.htaccess" ], "styles": [ "src/mining.scss", 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 + +