2013-04-03 3 views
0

.htaccess를 구성하는 데 익숙하지 않아서 도와주세요.index.php 요청을 http : // localhost/website/.htaccess로 리디렉션

은 내가 index.php에로가는 링크가 있지만

eg. 
http://localhost/website/index.php 

나는 그것이

입니다 루트 폴더로 리디렉션 할 index.php를 내 URL에 표시하지 않으려는
http://localhost/website/ 

그래서 답변을 검색해 보았습니다. 그리고 지금까지 내가 얻은 것입니다.

http://localhost/Applications/XAMPP/xamppfiles/htdocs/website/localhost/website/ 

사람이 무슨 일이 일어나고 있는지 설명 할 수 -

RewriteEngine on 

Options +FollowSymLinks 
RewriteCond %{THE_REQUEST} ^.*/index.php 
RewriteRule ^(.*)index.php$ http://localhost/website/$1 [R=301,L] 

지금 내가 대신이 리디렉션되고

http://localhost/website 

에 저를 리디렉션의, 내 로컬 웹 사이트에 홈을 클릭 할 때 에?

+0

프레임 워크 BATO의 kuya htaccess generator에서있어? –

+0

아니요. 프레임 워크가 아닙니다. –

답변

0

는 당신은 내가 최대한 빨리이 페이지를 새로 고침으로 적용되지 않습니다 내 htaccess로 만들어이 하나

RewriteRule ^(.*)$ /index.php/$1 [L] 
0

변화를 시도했다. 그 효과를보기 위해 캐시를 비우는 데 시간을 좀 걸렸습니다. #와

Options +FollowSymLinks 
RewriteEngine on 

#RewriteCond %{THE_REQUEST} ^.*/index.php 
#RewriteRule ^(.*)index.php$ http://localhost/website/$1 [R=301,L] 

#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /?(.*)/index\.php 
#RewriteRule^/%1 [L,R=301] 

#RewriteRule ^(.*)$ /index.php/$1 [L] 

의 선이 때문에 캐시를 삭제하지 어쩌면 내 문제가 해결되지 않았지만, 어쨌든 이 라인은 아래에있는 내 문제를 해결하지만 취소 나에게 5 회에 나섭니다 : 내 질문에 대한 다른 접근을 시도 실제로 결과를보기 전에 내 캐시.

RewriteRule ^index.php(.*)$ http://localhost/website/$1 [R=301,NC] 

나는

관련 문제