首页 > 其他 > 详细

blazor发布之后 刷新404的解决方法

时间:2021-01-11 20:51:13      阅读:164      评论:0      收藏:0      [点我收藏+]

其实所有单页面应用都一样

只需要在nginx里面配置

        location / {
            root   html;
            index  index.html index.htm;
            rewrite ^/.*/$ / last; # Redirect everything to / (ex index.html) and let the JS router take care of the rest
            rewrite ^([^.]*[^/])$ $1/ permanent; # Force trailing slash
        }

部署到gitee上需要加一个.spa文件 详见Pages 单页面应用支持

blazor发布之后 刷新404的解决方法

原文:https://www.cnblogs.com/Hero-/p/14263941.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!