【发布时间】:2015-05-12 15:07:07
【问题描述】:
我已经安装了 laravel 4.2 的新副本
当我访问本地路由 (localhost/public/) 时,它工作正常,但是当我访问其他路由时,例如“localhost/public/kk”,它显示 NotFoundHttpException。
这是我的 route.php 文件
<?php
Route::get('/',function(){
return View::make('hello');
});
Route::get('/kk',function(){
return View::make('hello');
});
这里是 .htaccess 文件
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
【问题讨论】:
-
如果您尝试:
/localhost/public/kk- 也找不到? -
其实是kk不是demo但是结果是一样的没找到