Browse Source

fix: 解决刷新页面404问题

master
niushuai233 2 years ago
parent
commit
2c6df1502b
  1. 5
      nginx-server.conf

5
nginx-server.conf

@ -5,10 +5,7 @@ server { @@ -5,10 +5,7 @@ server {
root /var/www/html/;
index index.html index.htm;
# 解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题
if (!-e \$request_filename) {
rewrite ^(.*)\$ /index.html?s=\$1 last;
break;
}
try_files $uri $uri/ /index.html;
}
location /api/ {

Loading…
Cancel
Save