2012-10-01 2 views
1

Codeigniter htaccess는 파일을 변경하지 않아도 갑자기 문제를 시작했습니다. 나는Codeigniter htaccess index.php 사이트 다운

을 www.mysite.com/index.php/controller/method에 액세스 할 수 있지만 액세스

을 www.mysite.com/controller/method

코드 네이 터 404가 아닌 일반 404를 제공합니다. 도움이 필요합니다. 사이트가 다운되었습니다.

여기에 내가 당신의 mod_rewrite는이 properly.Also이 .htacess 파일을 루트 디렉토리에 있는지 확인 작동하지 않는 100 % 확신 내 현재 htaccess로이 경우

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/

#Removes access to the system folder by users. 
#Additionally this will allow you to create a System.php controller, 
#previously this would not have been possible. 
#'system' can be replaced if you have renamed your system folder. 
RewriteCond %{REQUEST_URI} ^system.* 
RewriteRule ^(.*)$ /index.php/$1 [L] 

#Checks to see if the user is attempting to access a valid file, 
#such as an image or css document, if this isn't true it sends the 
#request to index.php 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
#This last condition enables access to the images and css folders, and the robots.txt file 
#Submitted by Michael Radlmaier (mradlmaier) 
RewriteCond $1 !^(index\.php|images|robots\.txt|css) 
RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule> 

<IfModule !mod_rewrite.c> 
# If we don't have mod_rewrite installed, all 404's 
# can be sent to index.php, and everything works as normal. 
# Submitted by: ElliotHaughin 

ErrorDocument 404 /index.php 
</IfModule> 
+1

실제 변경 사항이 있습니까? 그럴 가능성은 희박합니다. 호스팅 회사를 변경하지 않았다면 확인하고 업데이트가 발생했는지 묻습니다. –

+0

나는 이미 그들에게 아무것도 바꿀 것을 부탁했다. 나는 어제 몇 가지 변화를 만들었지 만 사이트는 문제없이 그 후 12-14 시간 동안 잘 작동했다. 어제부터 이전 버전을 복원했지만 여전히이 문제가 발생합니다. – user1711769

+0

웹 사이트의 관련 부분이 변경 되었습니까? 아파치에 대한 로그가 있고 오류가 있습니까? –

답변

1

입니다. 내 서버에서 제대로 작동하는이 서버가 사용자에게 도움이 될 수 있습니다. -

# rewrite rules 
RewriteEngine On 

# ditch index.php 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index.php?/$1 [L] 
+0

2 일간의 파고와 문제는 공유 된 바보 같은 사람들이 뭔가를 엉망으로 만든다. 하지만 명확히 해 주신 Sachin에게 감사드립니다. – user1711769