问题:
php项目部署后,首页可正常访问,但跳转其他页面均为404,经查询有以下原因
- 文件以及文件夹权限错误
- nginx配置错误
# 无效404方式
#location / {
# index index.html index.php;
# }
# 正确有效方式
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}