diff --git a/deploy/nginx/nginx.conf b/deploy/nginx/nginx.conf index 21132567b775e65ea1941173be50c28b35551746..69670a4ab72d4923612b2e6cd5db2e3642058c2b 100644 --- a/deploy/nginx/nginx.conf +++ b/deploy/nginx/nginx.conf @@ -101,6 +101,13 @@ http { return 404; } + location = / { + rewrite ^/$ /zh/issues/ redirect; + } + location = /zh/ { + rewrite ^/zh/$ /zh/issues/ redirect; + } + location / { limit_req zone=ratelimit burst=5 nodelay; proxy_set_header X-Forwarded-For $http_x_real_ip; @@ -115,6 +122,10 @@ http { add_header Cache-Control "public,max-age=1209600"; } + location / { + try_files $uri $uri/ /index.html; + } + root /usr/share/nginx/www; index index.html; } @@ -139,10 +150,6 @@ http { } - location ~ ^/(quick-issue) { - try_files $uri /index.html; - } - error_page 401 402 403 405 406 407 413 414 /error.html; error_page 404 /404.html; error_page 500 501 502 503 504 505 /error.html;