From: otbutz Date: Fri, 20 May 2022 08:15:28 +0000 (+0200) Subject: Simplify apache rewrite rules X-Git-Tag: v4.1.0~37^2~1 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/22bd9c4993ecb07d6c0b4f95d35c98bdfd98660d?ds=inline Simplify apache rewrite rules --- 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] ```