我刚开始在其中运行一个项目,当我向url NotFoundHttpException在RouteCollection.php第161行中输入模块名时,出现了错误。

下面是我的routes.php文件代码:
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', ['as' => 'home', 'uses' => 'Landing@index']);
Route::get('/buyerregistration',['as' => 'buyerregistration', function () {
return view('buyerregistration');
}]);
Route::get('owarehouse/{id}', ['as' => 'owarehouse',function () {
return view('owarehouse');
}]);
Route::get('/SMM', ['as' => 'SMM',function () {
return view('SMM');
}]);
Route::get('productconsumer/{id}/{openwish_id?}',array(
'as' => 'productconsumer',
'uses' => 'ProductController@productconsumer'));.htacces文件位于/public文件夹中,如下所示:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>有谁能帮我解决这个问题吗,谢谢
发布于 2016-01-03 08:32:29
{xampp_dir/wampp_dir}/apache/conf/httpd.conf,找到行#LoadModule rewrite_module modules/mod_rewrite.so并删除它前面的#。AllowOverride None并将其更改为AllowOverride All尝试localhost/Opensupermall/public/SMM这里的代码指向您的视图后的公用文件夹。现在,最佳实践是在生产中使服务器的根文件夹指向/public/文件夹
Route::get('/SMM', ['as' => 'SMM',function () {
return view('SMM');
}]);因此,您只需在根目录名称之后键入您的路由名称。
https://stackoverflow.com/questions/34574377
复制相似问题