nginx vue history模式 URL转发配置
#转发机制
location /{
index index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.*) /index.html last;
break;
}
}
实现:https://h5.xxx.com/mobile/acticity/album?id=1
#转发机制
location /{
index index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.*) /index.html last;
break;
}
}
实现:https://h5.xxx.com/mobile/acticity/album?id=1