所以我是一个新的Laravel用户,我只是直接进入文档开始。但我得到一个问题: 在app / routes.php中,我这样写:
Route::get('users',function() {
return 'hello';
});
Route::get('/',function() {
return View::make('hello');
});
当我点击
127.0.0.1/aerial/public/
它工作正常;点击时:
127.0.0.1/aerial/public/index.php/users or 127.0.0.1/aerial/public/users or localhost/aerial/public/index.php/users
它返回404;我的环境nginx。
答案 0 :(得分:0)
您应该将.htaccess
目录中的public
文件转换为nginx
格式,并确保已启用mod重写(或用于此的nginx模块)