2013-09-03 3 views
0

Apache2에서 mod_rewrite을 사용하고 기본 파일에서 AllowOverride All을 사용하고 있습니다. 그러나 Apache (다시 시작한 후)는 Laravel의 pretty url이 주어지면 리디렉션 할 수 없습니다.Laravel에 대한 Apache 리디렉션이 실패했습니다.

WORKS (반환 값 : 사용자!) : localhost/laratest/public/index.php/users

작동하지 않습니다 (404) : (나는 또한 하나가에서 제안 시도했다 : 내 htaccess로는

localhost/laratest/public/usersDocumentation

<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] 
+0

가능한 중복 (http://stackoverflow.com/questions/16912134/laravel-4-htaccess-not-rewriting-urls)에서 – Blenderer

+0

해결 방법 : HTTP ://stackoverflow.com/questions/16912134/laravel-4-htaccess-not-rewriting-urls – Blenderer

답변

0

As이 다른 하나를 시도 laravel 웹 사이트 (http://laravel.com/docs/installation#pretty-urls)에 제안?

Options +FollowSymLinks -Indexes 
RewriteEngine On 
RewriteBase /laratest/public 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule^index.php [L] 
[Laravel이 URL을 다시 쓰기 4 htaccess로하지 않음]의
+0

고마워,하지만이 또한 아무 소용이 시도, 나는 질문에 그것을 추가 할 것입니다. – Blenderer

1

당신이 당신의 RewriteBase/laratest/public에 설정 한 :

관련 문제