manong
manong
  • 发布:2020-11-13 01:42
  • 更新:2021-11-16 00:46
  • 阅读:1714

uniapp转H5,无法通过页面路径打开网页

分类:uni-app

uniapp转H5发布到unicloud前端网页托管,可以访问,在网页中点击内容可以正常页面跳转,但是无法通过指定路径打开指定页面。比如:https://www.abc.com/h5/pages/login/index,则提示:The requested file was not found on this server。路由hash和history都试过,都不可以。请问这是什么原因?

2020-11-13 01:42 负责人:无 分享
已邀请:
gysidon

gysidon

解决了吗兄弟?

  • manong (作者)

    使用hash就可以了

    2020-11-18 15:08

  • gysidon

    回复 manong: 好的,谢谢

    2020-11-18 22:23

树恒

树恒

服务端配置,
nginx.conf(或者宝塔--网站--设置-配置文件)
location / {
try_files $uri $uri/ /index.html$args;
}
或者你百度 vue history模式刷新404

该问题目前已经被锁定, 无法添加新回复