laravel部署到云服务器上,除了首页之外,区域页面找不到路由,都是报404错误
解决方法:
(注:本人服务器使用宝塔面板)
打开宝塔面板,找到该站点->配置文件
在下方增加如下代码
location / {# First attempt to serve request as file, then# as directory, then fall back to displaying a 404.# try_files $uri $uri/ =404;try_files $uri $uri/ /index.php?$query_string;}
完活!