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

藏色散人
Release: 2021-06-24 15:31:07
forward
3365 people have browsed it

宝塔部署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;
  }
}
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template