扫码关注官方订阅号
环境是 nginx+php-fpmnginx配置如下:
路由配置:Route::get('/', function () {
return view('welcome');
});
Route::get('hello',function(){
return 'hello world';
人生最曼妙的风景,竟是内心的淡定与从容!
放我的给你参考一下
server { listen 80; server_name Xxx.xxx.com; index index.php index.html index.htm; root /xxx/xxx/xxx/public; access_log /xxx/xxx/xxx.log access; location ~ .*\.(php)?$ { try_files $uri = 404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fcgi.conf; } location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php?s=/$1 last; } #try_files $uri $uri/ /index.php?$query_string; } }
你设置rewrite了吗
去掉rewrite,看看
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
放我的给你参考一下
你设置rewrite了吗
去掉rewrite,看看