Rewrite /0.n/... as /api/0.n/... for the api virtual host.

This commit is contained in:
Tom Hughes 2009-04-20 15:16:38 +00:00
parent 869da5e228
commit f9f5856d2b

View file

@ -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;
}