单页面应用使用history改变url,页面刷新或者直接访问url,应该要怎么处理?还需要后端路由吗?
1 回答

繁星淼淼
TA贡献1775条经验 获得超11个赞
在网页服务器上做地址重定向,常用的 nginx 配置示例如下:
location / { rewrite / /index.html; break; }
添加回答
举报
0/150
提交
取消