From: Tom Hughes Date: Mon, 20 Apr 2009 15:16:38 +0000 (+0000) Subject: Rewrite /0.n/... as /api/0.n/... for the api virtual host. X-Git-Tag: live~7553 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/f9f5856d2bc1e4cad95aba8248fe119a7081dbbb?hp=869da5e2287989da77da203e8c60442b96e5cef3;ds=sidebyside Rewrite /0.n/... as /api/0.n/... for the api virtual host. --- diff --git a/config/nginx.conf b/config/nginx.conf index af43ed2a2..745fa555e 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -110,6 +110,10 @@ http { index index.html; access_log /var/log/nginx/openstreetmap.org.access.log; + if ($host ~* api\.(.*)) { + rewrite ^/(0\.[0-9]+)/(.*)$ /api/$1/$2 + } + location / { deny 143.210.16.160; allow all; @@ -118,6 +122,7 @@ http { location /trac/ { rewrite ^/trac/(.*)$ http://trac.openstreetmap.org/$1 permanent; } + location /wiki/ { rewrite ^/wiki/(.*)$ http://wiki.openstreetmap.org/$1 permanent; }