내가 가진 하위 폴더 :htaccess로 재 경로 공공 디렉토리는
public/
-- index.php
-- my_subdir/
---- index.php
은 단순히 다시 경로를 할 my_subdir로합니다.
(그 이유는 무엇입니까? my_subdir 내 새의 Joomla 웹 사이트를 포함하고 있기 때문에.)
편집, 다른 모든 솔루션를 작동하지 않는 이유를 설명 할 수 ... 나는 몇 시간 동안이 작업되었으며, 아무것도 작동하지 않았다. 심지어 여기서 받아 들여지는 대답조차도 처음에는 효과가 없었습니다. 문제는 구글이 제공 한 많은 솔루션이 아니라 오히려 상반되는 규칙/조건을 가지고 있다는 것이 었습니다. 같은 디렉토리 구조가있는 경우
RewriteEngine on
<<<< RewriteCond %{REMOTE_HOST} !^111\.111\.111\.111
######## my ip address for testing
######## because this was not originally included,
######## apparently I was being redirected to maintenance.html ...
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteRule $ /maintenance.html [R=302]
######## thus by the time the script/server got to this line
######## I was actually at maintenance.html,
######## and so this next condition did not apply to me
RewriteCond %{REQUEST_URI} !^/my_subdir
RewriteRule ^.*$ /my_subdir/$0 [L]
왜'public/my_subdir'을 문서 루트로 설정하지 않으시겠습니까? 이전 내용을 삭제하고 새 내용으로 바꾸지 않는 이유는 무엇입니까? – Oswald
oswald, 하위 디렉토리를 doc로 설정하는 방법을 모르겠습니다. 뿌리. – dsdsdsdsd
사용중인 웹 서버 소프트웨어에 따라 다릅니다. Apache HTTP Server에는 기본 구성 또는 가상 호스트에서 설정할 수있는 [DocumentRoot 지시문] (http://httpd.apache.org/docs/current/mod/core.html#documentroot)이 있습니다. Plesk Panel 또는 다른 소프트웨어를 사용하여 웹 서버 구성을 관리하는 경우 이러한 소프트웨어에는 문서 루트를 설정할 수있는 GUI 프론트 엔드가 함께 제공되는 경우가 많습니다. – Oswald