宝塔面板react使用Browser history后刷新报404错误

如果宝塔面板使用的是nginx环境的话,只需在网站设置中选择伪静态,然后配置如下即可

location /{
    try_files $uri /index.html;
}

location ~ \.htaccess{
    deny all;
}

 

posted @ 2019-10-18 21:45  passerma  阅读(466)  评论(0)    收藏  举报