File tree 1 file changed +16
-0
lines changed
setup/www/resources/config 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ server {
45
45
}
46
46
47
47
location / {
48
+ try_files $uri $uri/ @english_fallback;
49
+
48
50
location ~ \.json$ {
49
51
add_header access-control-allow-origin *;
50
52
}
@@ -59,6 +61,12 @@ server {
59
61
add_header access-control-allow-origin *;
60
62
}
61
63
}
64
+
65
+ # instead of serving a 404 page when a page hasn't been translated
66
+ location @english_fallback {
67
+ rewrite ^/(it|ko)/(.*)$ http://nodejs.org/en/$2;
68
+ return 404;
69
+ }
62
70
}
63
71
64
72
server {
@@ -215,11 +223,19 @@ server {
215
223
location / {
216
224
rewrite ^/$ /en/ redirect;
217
225
226
+ try_files $uri $uri/ @english_fallback;
227
+
218
228
location ~ \.json$ {
219
229
add_header access-control-allow-origin *;
220
230
}
221
231
}
222
232
233
+ # instead of serving a 404 page when a page hasn't been translated
234
+ location @english_fallback {
235
+ rewrite ^/(it|ko)/(.*)$ https://nodejs.org/en/$2;
236
+ return 404;
237
+ }
238
+
223
239
location /download {
224
240
alias /home/dist/nodejs;
225
241
autoindex on;
You can’t perform that action at this time.
0 commit comments