【发布时间】:2015-11-20 16:47:51
【问题描述】:
我说错了
找不到
在此服务器上找不到请求的 URL /about。
我有这条路线
Route::get('/', 'megamitch@index');
Route::get('home', 'megamitch@index');
Route::get('about', 'megamitch@about');
Route::get('loan-products', 'megamitch@loanproducts');
Route::get('careers', 'megamitch@careers');
Route::get('contact', 'megamitch@contact');
如果我执行“php artisan route:list”,我可以看到这些路由确实存在。我在存在该问题的 wamp 服务器上运行(在实时 Web 服务器上存在相同问题),但是如果我通过“php artisan serve”运行我的应用程序,所有页面都可以工作。有什么想法,帮忙?
PS:只有这条路线“Route::get('/', 'megamitch@index');”有效。
【问题讨论】:
-
/index.php/about有效吗?如果是这样,那么您的 apache 配置不会重写 URL。 -
是的,它可以工作,我将如何配置 apache 配置以便它会重写 url 或修复什么?
标签: php laravel laravel-5 wamp wampserver