在 Nginx 对应的站点配置中添加下列配置,Laravel框架有此问题也是类似的解决方案
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last; break;
}
}
Nginx配置Laravel重写规则
本文介绍如何通过Nginx配置文件为Laravel框架设置URL重写规则,确保所有请求都能正确地指向index.php文件进行处理。
在 Nginx 对应的站点配置中添加下列配置,Laravel框架有此问题也是类似的解决方案
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last; break;
}
}
908
706
1929
704

被折叠的 条评论
为什么被折叠?