在iis中解决vue3的VUE History模式下项目刷新后或者直接跳转地址出现404的问题
参考 资料 https://blog.csdn.net/qq_38425048/article/details/137628970
第一步 下载iis的urlrewrite 并安装
第二步 如果是静态网站,将webconfig文件,放到网站根目录并重启。
注意。如果是netcore网站,请按上面的文章手动设置iis重写规则,或者将webconfig文件的内容添加到原有的文件中,最好不要直接覆盖。
另外 ngnix的设置方式 参考 https://cloud.tencent.com/developer/article/1470946
官网推荐
location / {
root D:\Test\exprice\dist;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
匹配错误页
location /{
root /data/nginx/html;
index index.html index.htm;
error_page 404 /index.html;
}
用到的文件 https://files.cnblogs.com/files/wang2650/iisrewrite.zip?t=1747742643&download=true
作者:过错
出处:http://www.cnblogs.com/wang2650/
关于作者:net开发做的久而已。十余年时光虚度!
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。如有问题,可以邮件:wang2650@163.com
联系我,非常感谢。

浙公网安备 33010602011771号