Php laravel 5.1 notfoundhttpexception适用于除'/';
这是我的路线Php laravel 5.1 notfoundhttpexception适用于除'/';,php,laravel,laravel-5.1,Php,Laravel,Laravel 5.1,这是我的路线 <?php Route::get('/', function () { return 'reached'; }); Route::post('first', function () { return 'first'; }); 但是如果我运行localhost/project/first 可能是什么问题? 新安装后,我刚刚安装了illumb/html 更新: 我甚至试过 Route::get('first', function () { return 'fi
<?php
Route::get('/', function () { return 'reached'; });
Route::post('first', function () { return 'first'; });
但是如果我运行localhost/project/first
可能是什么问题?
新安装后,我刚刚安装了illumb/html
更新:
我甚至试过
Route::get('first', function () { return 'first'; });
如果我理解正确,url
localhost/project
指向公用文件夹中的index.php
文件。这似乎运行正常,但是要访问任何其他页面,必须在apache中启用mod_rewrite
- 导航到apache文件夹中的
文件httpd.conf
- 搜索
,然后通过删除mod_rewrite
- 重新启动apache服务器并重试
composer dump autoload
,即使在尝试之后\use composer在包含artisan.php的文件夹中
Route::get('first', function () { return 'first'; });