From 22bd9c4993ecb07d6c0b4f95d35c98bdfd98660d Mon Sep 17 00:00:00 2001 From: otbutz Date: Fri, 20 May 2022 10:15:28 +0200 Subject: [PATCH] Simplify apache rewrite rules --- docs/admin/Setup-Nominatim-UI.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/admin/Setup-Nominatim-UI.md b/docs/admin/Setup-Nominatim-UI.md index 374a84e1..02ff7df1 100644 --- a/docs/admin/Setup-Nominatim-UI.md +++ b/docs/admin/Setup-Nominatim-UI.md @@ -163,22 +163,14 @@ directory like this: # If format-html is explicity requested, forward to the UI. RewriteCond %{QUERY_STRING} "format=html" - RewriteRule ^([^/]+).php ui/$1.html [R,END] - # Same but .php suffix is missing. - RewriteCond %{QUERY_STRING} "format=html" - RewriteRule ^([^/]+) ui/$1.html [R,END] + RewriteRule ^([^/]+)(?:.php)? ui/$1.html [R,END] # If no format parameter is there then forward anything # but /reverse and /lookup to the UI. RewriteCond %{QUERY_STRING} "!format=" RewriteCond %{REQUEST_URI} "!/lookup" RewriteCond %{REQUEST_URI} "!/reverse" - RewriteRule ^([^/]+).php ui/$1.html [R,END] - # Same but .php suffix is missing. - RewriteCond %{QUERY_STRING} "!format=" - RewriteCond %{REQUEST_URI} "!/lookup" - RewriteCond %{REQUEST_URI} "!/reverse" - RewriteRule ^([^/]+) ui/$1.html [R,END] + RewriteRule ^([^/]+)(?:.php)? ui/$1.html [R,END] ``` -- 2.45.2