尽管可以加载/articles/create
或/article
,但似乎无法在Laravel中加载类似/article/{id}
的路线。我仍然得到错误:
Sorry, the page you are looking for could not be found.
当它显然有一些简单的东西
Route::get('/articles/create', function() {
return "The Real Slim Shady";
});
编辑:我的日志中也没有错误,只有[Sun Aug 16 04:39:49 2015] ::1:60349 [200]: /favicon.ico
所以没有什么有趣的。
编辑:
MyComputer:laravel myname$ php artisan route:list
+--------+----------+-----------------+------+-----------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+-----------------+------+-----------------------------------------------+------------+
| | GET|HEAD | / | | Closure | |
| | GET|HEAD | articles | | App\Http\Controllers\ArticlesController@index | |
| | GET|HEAD | articles/create | | Closure | |
| | GET|HEAD | articles/{id} | | App\Http\Controllers\ArticlesController@show | |
| | GET|HEAD | laravel | | Closure | |
+--------+----------+-----------------+------+-----------------------------------------------+------------+
路线确实存在。
编辑:
我还尝试更改每个Laravel关于.htaccess
规则的mod_rewrite
指令。我唯一可以改变的是将Options -MultiViews
更改为Options +FollowSymLinks
但不做任何更改。