2012-09-08 2 views
0

index.php 및 액세스 컨트롤러를 제거하려고하면 : mysite.com/admin 계속 내부 서버 오류가 발생합니다. 왜 작동하지 않는지 나는 모른다.htaccess를 사용하여 index.php를 제거 할 수 없습니다

htaccess로

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /code/ 

RewriteCond %{REQUEST_URI} ^system.* 
RewriteRule ^(.*)$ index.php?/$1 [L] 

RewriteCond %{REQUEST_URI} ^application.* 
RewriteRule ^(.*)$ index.php?/$1 [L] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?/$1 [L] 
</IfModule> 

사이트 설정

<Directory /home/mysite.com/public_html/> 
Options Indexes Includes FollowSymLinks MultiViews 
AllowOverride AuthConfig FileInfo 
Order allow,deny 
Allow from all 
</Directory> 

아파치 오류 로그

[Sat Sep 08 15:24:30 2012] [error] [client 176.106.162.240] 
Request exceeded the limit of 10 internal redirects 
due to probable configuration error. Use 'LimitInternalRecursion' 
to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. 
+1

으로 시도 RewriteBase /code/

에 문제가 참조 ? 문제를 추측하기보다는 항상 로그를 보는 것으로 시작하는 기본적인 디버깅을 직접해야합니다. –

답변

0

변경 htaccess로

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /code/ 

RewriteCond %{REQUEST_URI} ^system.* 
RewriteRule ^(.*)$ index.php?/$1 [L] 

RewriteCond %{REQUEST_URI} ^application.* 
RewriteRule ^(.*)$ index.php?/$1 [L] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?/$1 [L] 
</IfModule> 

일이 속으로 :

RewriteEngine On 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index.php [L,NC] 

나는 당신이 무엇을 필요로 생각하지 않는다. 상세하게보고하지 않고

+0

Naw, 동일 + 아파치 오류 로그를 추가했습니다. – Reinis

+0

안녕하세요, index.php 대신 Index.php가 있는데, 도와 줄 수 있습니까? –

0

나는 당신이 문제가 500을 유발하는 것이라고 말합니다 정확히 확인하기 위해 서버 오류 로그 봤어 RewriteBase /

0
You just need to create .htaccess file in project folder and write: 

RewriteEngine On 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

# Rewrite all other URLs to index.php/URL 
RewriteRule ^(.*)$ index.php?url=$1 [PT,L] 

</IfModule> 
<IfModule !mod_rewrite.c> 
    #ErrorDocument 404 index.php 
</IfModule> 

#And You don't need to define in base_url in config file: 

$config['base_url'] = '';// blank it. 

I hope it will work perfectly ... 
관련 문제