X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d6f7bbfcd1c0c4befeb85b5a3ee8e2d8ecf1892d..a8bfe7c32ed654b0474b894f44da49c3f136266b:/config/lighttpd.conf diff --git a/config/lighttpd.conf b/config/lighttpd.conf index 22051eb44..3f16d6ec9 100644 --- a/config/lighttpd.conf +++ b/config/lighttpd.conf @@ -90,7 +90,7 @@ compress.filetype = ( # Set expiry for static content # expire.url = ( - "/export/" => "access 7 days", + "/export/embed.html" => "access 7 days", "/images/" => "access 10 years", "/javascripts/" => "access 10 years", "/openlayers/" => "access 7 days", @@ -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 #