2014-06-21 1 views
0

htacess에 약간 문제가 있습니다. 현재 루트에 htacess 있습니다 -상태에 따라 루트 디렉토리로 서브 디렉토리

Options +FollowSymLinks 
RewriteEngine On 

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

RewriteRule ^.*$ ./index.php 

URL에있는 모든 것이 루트 디렉토리의 index.php에 직접 닿았습니다.

이제 "test"라는 폴더가 있습니다. 내가 http://example.com/test/를 입력 할 때

현재는 http://example.com/index.php에 명중하지만 난 그것을 http://example.com/test/index.php하지 루트 디렉토리 칠 것이다 내가 http://example.com/test/에 충돌 할 때합니다.

즉,/test/URL에서만 몇 가지 해결책을 시도했지만 전혀 작동하지 않았습니다.

내 로컬 호스트에서 "test"폴더에 루트 htacess를 넣고 작동하지만 서버에서는 작동하지 않습니다.

미리 감사드립니다.

답변

0
혼자

찾을 솔루션 : D

Options +FollowSymLinks 
RewriteEngine On 

RewriteCond %{SCRIPT_FILENAME} !-d 
RewriteCond %{SCRIPT_FILENAME} !-f 
RewriteRule ^test/ test/index.php [L,NC] 

RewriteCond %{SCRIPT_FILENAME} !-d 
RewriteCond %{SCRIPT_FILENAME} !-f 
RewriteRule^/index.php [L] 
관련 문제