2012-12-15 8 views
0

내 사이트의 전체 서브 디렉토리, 즉 http://www.mydomain.com/subdirectory을 내 사이트의 루트 도메인에 리디렉션하고 싶습니다. http://www.mydomain.com .htaccess를 통해이를 수행하는 방법을 알려 줄 수 있습니까?하위 도메인을 루트 도메인으로 리디렉션

Cpanel을 사용해 보았지만 와일드 카드 리디렉션을 사용할 수있게되었지만 슬프게도 작동하지 않습니다!

하위 디렉토리는 실제로 별도의 WordPress 설치입니다.

감사

답변

0

루트 디렉토리에 다음의 .htaccess 파일을 넣어 :

Redirect /subdirectory http://www.example.com 

이 (로드 할 mod_alias 필요) 또는 mod_redirect를 사용하여 넣어. htaccess 파일을 하위 디렉토리에 복사합니다.

RewriteEngine On 
RewriteRule (.*) http://www.example.com/$1 

참조 : mod_rewrite 문서는 http://httpd.apache.org/docs/current/rewrite/을 참조하십시오.

관련 문제