2013-05-03 3 views

답변

2

귀하의 .htaccess가

RewriteEngine on 
RewriteBase/

RewriteCond %{HTTP_HOST} ^sub\.domain\.com$ [NC] 
RewriteCond %{REQUEST_URI} ^/?$ 
RewriteRule .* http://domain.com [R,L] 
+0

완벽한 같아야합니다, 당신에게 너무 많은 라비 감사합니다! – callmedpit

+0

내가 도와 줘서 다행이야! –

0

이것은 루트 디렉토리에있는 .htaccess 내에서 작동합니다. 빈 규칙 (^$ 사이에 없음)은 / (루트)으로 해석됩니다. 서브 페이지와 서브 디렉토리는 영향을받지 않아야합니다. mod_rewrite가 필요합니다.

RewriteEngine on 
RewriteRule ^$ http://new.domain.com/ [L]