]> git.openstreetmap.org Git - rails.git/blobdiff - config/lighttpd.conf
Create a custom build of OpenLayers to allow us to pull in extra
[rails.git] / config / lighttpd.conf
index 22051eb44657c667356d8f50b5e93a4b319407a3..3f16d6ec9391f702e37225a93a3851cb64376c45 100644 (file)
@@ -90,7 +90,7 @@ compress.filetype = (
 # Set expiry for static content
 #
 expire.url = (
 # 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",
   "/images/" => "access 10 years",
   "/javascripts/" => "access 10 years",
   "/openlayers/" => "access 7 days",
@@ -110,6 +110,19 @@ url.redirect = (
   "^/wiki/(.*)$" => "http://wiki.openstreetmap.org/$1"
 )
 
   "^/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
 #
 #
 # Run anything with a .pl iextension as a CGI script
 #