File tree Expand file tree Collapse file tree 1 file changed +2
-31
lines changed Expand file tree Collapse file tree 1 file changed +2
-31
lines changed Original file line number Diff line number Diff line change @@ -28,43 +28,14 @@ server {
2828 try_files $uri =404 ;
2929 }
3030
31- # 重定向规则
32- location = /use {
33- return 301 /docs/use /;
34- }
35-
36- location = /use / {
37- return 301 /docs/use /;
38- }
39-
40- location = /docs/use / {
41- return 301 /docs/use /use /;
42- }
43-
44- location ~ ^/dev/( .*) $ {
45- return 301 /docs/dev/$1 ;
46- }
47-
48- location = /dev {
49- return 301 /docs/dev/;
50- }
51-
52- location ~ ^/change/( .*) $ {
53- return 301 /docs/change/$1 ;
54- }
55-
56- location = /change {
57- return 301 /docs/change/;
58- }
59-
6031 # 尝试文件,如果不存在则显示404页面
6132 location / {
62- try_files $uri $uri / /404 .html;
33+ try_files $uri $uri /index .html $uri / /404 .html;
6334 }
6435
6536 # 缓存静态资源
6637 location ~ * \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
67- expires 1y ;
38+ expires 1d ;
6839 add_header Cache-Control "public, immutable" ;
6940 }
7041}
You can’t perform that action at this time.
0 commit comments