From 0646fb8665adace4be5d7d35bb3f8931b24d87fe Mon Sep 17 00:00:00 2001 From: Sander Date: Thu, 10 Oct 2019 10:14:25 +0200 Subject: [PATCH] Added sample .htaccess file to Readme --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index f97d272..c83d6fa 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,22 @@ try_files $uri $uri/index.html $uri.html /app.html; } ``` +Apache 2.4 .htaccess: +``` +DirectorySlash Off +RewriteEngine On +RewriteBase / + +RewriteRule ^index\.html$ - [L] + +RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.html -f +RewriteRule ^(.+)$ /$1.html [L,QSA] + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . /app.html [L,QSA] +``` + And an example Firebase configuration (taken from https://stackoverflow.com/a/51218261): ```json