Home >Topics >Pagoda Panel >When pagoda deploys the vue project, accessing the homepage is normal, but other pages cannot be accessed. 404 solution

When pagoda deploys the vue project, accessing the homepage is normal, but other pages cannot be accessed. 404 solution

藏色散人
藏色散人forward
2021-06-24 15:31:073375browse

宝塔部署vue项目时,访问首页正常,但其他页面无法访问404是怎么回事?下面由宝塔面板教程栏目就给大家介绍该问题的解决办法~

When pagoda deploys the vue project, accessing the homepage is normal, but other pages cannot be accessed. 404 solution

解决宝塔部署vue项目时,访问首页正常,其他页面无法访问404

如题,访问首页没问题,其他页面404.其实只要项目配置伪静态即可;

宝塔-》网站-》设置-》伪静态

location / {
  if (!-e $request_filename) {
    rewrite  ^(.*)$ /index.html?s=/$1  last;
    break;
  }
}

When pagoda deploys the vue project, accessing the homepage is normal, but other pages cannot be accessed. 404 solution

配置好保存即可。

The above is the detailed content of When pagoda deploys the vue project, accessing the homepage is normal, but other pages cannot be accessed. 404 solution. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete