Code前端首页关于Code前端联系我们

thinkphp5后端+vue前端页面开发,刷新代码报404错误

terry 2年前 (2023-09-25) 阅读数 48 #后端开发

thinkphp5开发后端,使用vue.js开发前端,打包前端时使用history模式;
将home代码放入public文件夹,刷新报404错误!

Thinkphp5后端+ vue前端页面开发,代码刷新报404错误

Thinkphp5后端+ vue前端页面开发,代码刷新报404错误

nginx配置文件

location / {
root E:/www/doctorLink/public;
index index.php index.html index.htm;

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

版权声明

本文仅代表作者观点,不代表Code前端网立场。
本文系作者Code前端网发表,如需转载,请注明页面地址。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门