2014-05-16 3 views
1

내 질문에 대한 검색을 수행했지만 아직 내 것과 비슷한 것을 보았습니다.코드 이그니 터에서 index.php 제거

내 서버에 CI가 새로 설치되었습니다. 보안상의 이유로 "application"및 "system"폴더를 public_html 외부의 "app"폴더로 옮겼습니다. 포럼에서 사용하고있는 많은 방법을 시도했지만 도움이되지는 않습니다.

아래는 내 폴더 구조입니다. .htaccess를 입력 할 대상을 알고 싶습니다.이 .htaccess는 어디로 이동합니까?

/ 
app (system and application folder for CI resides here) 
public_html (index.php - the one which defines ENVIRONMENT, styles, other htmls and my current .htaccess resides here) 

나의 현재의 .htaccess는 다음과 같습니다

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule .* index.php/$1 [PT,L] 

도와주세요! 시간 내 주셔서 감사합니다!

편집 현재 내 URL이 같은이 xxx.xxx.xxx.xxx/~app/index.php/user/check/id (그것에서의 공유 호스팅 아직 도메인에 연결되지 및 가 을 xxx.xxx.xxx.xxx/~app/user/check/id하고 내 도메인을 연결하면 작동합니다 같은 URL에 따라서 IP 주소 및 파티션.)

내가 뭔가를 달성하고 싶다. (예 : www.mydomain.com/user/check/id)

+0

'index.php '를 제거하고 싶지 않습니까? – Rudie

+0

나는 내 질문에 더 많은 정보를 추가 할 것이다. – dionkta

답변

0

좋아, 문제는 해결 된 것 같습니다.

이것은 아마도 내가 가진 '고유 한'URL과 관련이 있습니다. 정상적인 도메인 이름이라면별로 문제가 없어야한다고 생각합니다. > xxx.xxx.xxx.xxx/~app/index.php/user/check/id

내 디렉토리 구조

내 URL이 같은>

/응용 프로그램 유지 (응용 프로그램 및 시스템 디렉토리 간다 다음과 같이 여기)

/public_html을 (index.php에와 htaccess로)는 여기

htaccess로 코드를 간다 :

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /~app/      << NOTE the addition 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule> 
config.php를에서

는 전부 그

$config['base_url'] = 'http://xxx.xxx.xxx.xxx/~app/'; 
$config['index_page'] = ''; 

을 설정!

관련 문제