Skip to content

Commit

Permalink
nodejs.org: falling back to english when page hasn't been translated.
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipj committed Mar 9, 2016
1 parent 4030c77 commit 0a34b07
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions setup/www/resources/config/nodejs.org
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ server {
}

location / {
try_files $uri $uri/ @english_fallback;

location ~ \.json$ {
add_header access-control-allow-origin *;
}
Expand All @@ -59,6 +61,13 @@ server {
add_header access-control-allow-origin *;
}
}


# instead of serving a 404 page when a page hasn't been translated
location @english_fallback {
rewrite ^/(it|ko)/(.*)$ http://nodejs.org/en/$2;
return 404;
}
}

server {
Expand Down

0 comments on commit 0a34b07

Please sign in to comment.