Apache2에서 mod_rewrite
을 사용하고 기본 파일에서 AllowOverride All
을 사용하고 있습니다. 그러나 Apache (다시 시작한 후)는 Laravel의 pretty url이 주어지면 리디렉션 할 수 없습니다.Laravel에 대한 Apache 리디렉션이 실패했습니다.
WORKS (반환 값 : 사용자!) : localhost/laratest/public/index.php/users
작동하지 않습니다 (404) : (나는 또한 하나가에서 제안 시도했다 : 내 htaccess로는
localhost/laratest/public/users
Documentation
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [L]
</IfModule>
Laravel 패주) 아무 소용이 es.php :
Route::get('/', function()
{
return View::make('hello');
});
Route::get('users', function()
{
return 'Users!';
});
나는 우분투의 기본 LAMP 스택 및 구성을 사용하고 있습니다. 이 아이디어가 효과가없는 이유는 무엇입니까?
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [L]
가능한 중복 (http://stackoverflow.com/questions/16912134/laravel-4-htaccess-not-rewriting-urls)에서 – Blenderer
해결 방법 : HTTP ://stackoverflow.com/questions/16912134/laravel-4-htaccess-not-rewriting-urls – Blenderer