Im using laravel 4. (我正在使用laravel 4。)
I have a view nest.blade.php
and the corresponding controller NestController.php:
(我有一个view nest.blade.php
和相应的控制器NestController.php:
)
Controller content: (控制器内容:)
class NestController extends BaseController {
public function showView()
{
return View::make('nest');
}
}
Route: (路线:)
Route::get('/nest', 'NestController@showView');
When I go to url/nest it doesnt work. (当我去网址/嵌套它不起作用。) When I go to url/index.php/nest it does work. (当我转到url / index.php / nest时,它确实起作用。)
Obviously I just want it to be /nest without the index.php. (显然,我只希望它不带index.php即可。)
How can i resolve this? (我该如何解决?)
My htaccess: (我的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]
</IfModule>
ask by RSM translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…