2010-06-21 2 views
0

에 나는 하위 디렉토리에 젠드 프레임 워크 프로젝트를 설정하고 싶습니다 :젠드 프레임 워크는 하위 디렉토리

/public_html 
    /public_html/here_i_want_to_setup_zf 

문서 루트는/public_html이 있습니다. 젠드 프레임 워크 프로젝트는 URI를 통해 다음과 같이 URI를 통해 액세스 할 수 있습니다.

http://example.com/here_i_want_to_setup_zf 

htaccess 파일을 어떻게 편집해야합니까?

RewriteEngine On 

# Exclude some directories from URI rewriting 
#RewriteRule ^(dir1|dir2|dir3) - [L] 

RewriteRule ^\.htaccess$ - [F] 

RewriteCond %{REQUEST_URI} ="" 
RewriteRule ^.*$ /public/index.php [NC,L] 

RewriteCond %{REQUEST_URI} !^/public/.*$ 
RewriteRule ^(.*)$ /public/$1 

RewriteCond %{REQUEST_FILENAME} -f 
RewriteRule ^.*$ - [NC,L] 

RewriteRule ^public/.*$ /public/index.php [NC,L] 

답변

2

터치 htaccess로 또는 폴더 구조를 해달라고! 중앙 지점에서 다음을 수행하십시오.

Zend_Controller_Front::getInstance() 
    ->getRequest() 
    ->setBaseUrl('/here_i_want_to_setup_zf/'); 
0

나는 이것을 구현하기 위해 index.php 파일과 .htaccess 파일이 zend 프레임 워크의 루트 디렉토리에 있어야한다고 생각합니다.

당신의 서브 디렉토리와 지금 당신의 서브 디렉토리에있는 public html/name은 다음과 같은 구조를 가지고 있습니다.

/index.php

/.htaccess

/라이브러리

/응용 프로그램

/공공

관련 문제