From b2dc4540064d7d98ce81b8be6c5022a82195ef1f Mon Sep 17 00:00:00 2001 From: Rub21 Date: Tue, 10 Oct 2023 22:24:50 -0300 Subject: [PATCH] Redirect non-api calls --- images/web/config/production.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/images/web/config/production.conf b/images/web/config/production.conf index 5b41eb1c..4d558981 100644 --- a/images/web/config/production.conf +++ b/images/web/config/production.conf @@ -33,6 +33,14 @@ RewriteRule ^/api/0\.6/(nodes|ways|relations)(\.json|\.xml)?$ fcgi://127.0.0.1:8000$0 [P] RewriteRule ^/api/0\.6/changeset/[0-9]+/(upload|download)(\.json|\.xml)?$ fcgi://127.0.0.1:8000$0 [P] + # + # Redirect non-api requests made to api.openhistoricalmap.org to www.openhistoricalmap.org + # Testing + # + RewriteCond %{HTTP_HOST} ^api\. + RewriteCond %{REQUEST_URI} !^/api/ + RewriteRule ^(.*)$ https://staging.openhistoricalmap.org$1 [L,NE,R=permanent] + # Relax Apache security settings AllowOverride None