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

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

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

location ~ \.htaccess{
    deny all;
}

猜你喜欢

转载自www.cnblogs.com/passerma/p/11701025.html