我正在使用laravel 4.1与php 5.3.13,但路由不工作。我在"about.php"视图下做了一个简单的页面,并在我的路由中添加:
Route::get('/', function()
{
return View::make('hello');
});
Route::get('about', function()
{
return View::make('about');
});
Route::resource('user', 'userInscriptionController');
Route::group(array('prefix' => ''), function()
{
Route::resource('user', 'userInscriptionController');
});
但是只有"hello"页面有效,其他页面给我以下消息:
Not Found
The requested URL /driving/public/about was not found on this server.
我猜你正在使用apache,如果是这种情况,AllowOverride选项被设置为none,所以。htaccess文件自带的laravel来启用"漂亮的url",它不会被加载。
Try http://mywebserver/mylaravelwebsite/index.php/about