0

codeigniter PHP 프레임 워크를 사용하고 있습니다. public_html 아래에있는 폴더에 액세스하려고 시도하지만 액세스 할 수 없습니다. codeigniter에 의해 404 커스텀 페이지를 보여줍니다. .htaccess의 다음 스크립트가이 스크립트와 관련이 있습니까?htaccess 파일이 잘못 구성되었습니다.

RewriteEngine on 
RewriteCond $1 !^(index\.php|js|images|robots\.txt) 
RewriteRule ^(.*)$ /index.php/$1 [L] 

감사

그것은 아마, 당신도 일부 조건 추가 시도 할 수있다

답변

2

:

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond $1 !^(index\.php|js|images|robots\.txt) 
RewriteRule ^(.*)$ /index.php/$1 [L] 

또는 배제의 일환으로 폴더 포함 (예를 들어, 당신의 폴더 "는 foobar"입니다) :

RewriteEngine on 
RewriteCond $1 !^(index\.php|js|images|robots\.txt|foobar) 
RewriteRule ^(.*)$ /index.php/$1 [L] 
+0

우수한 직장 동료. 감사 – spacemonkey

관련 문제