From ddde8689a601615b016a79b86a651ee668b1e601 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 30 May 2009 11:55:31 +0000 Subject: [PATCH] Redirect to canonical hosts. --- config/lighttpd.conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config/lighttpd.conf b/config/lighttpd.conf index 22051eb44..80b941fa6 100644 --- a/config/lighttpd.conf +++ b/config/lighttpd.conf @@ -110,6 +110,19 @@ url.redirect = ( "^/wiki/(.*)$" => "http://wiki.openstreetmap.org/$1" ) +# +# Redirect everything except www.openstreetmap.org and +# api.openstreetmap.org to www.openstreetmap.org +# +$HTTP["host"] =~ "^api\." { + $HTTP["host"] != "api.openstreetmap.org" { + url.redirect = ( "^(.*)$" => "http://api.openstreetmap.org$1" ) + } +} +else $HTTP["host"] != "www.openstreetmap.org" { + url.redirect = ( "^(.*)$" => "http://www.openstreetmap.org$1" ) +} + # # Run anything with a .pl iextension as a CGI script # -- 2.43.2