2011-01-23 5 views
0

htaccess로 생성하려면 www.website1.com/page.php로 이동하여 www.website2.com/page.php로 이동 한 다음 www.website1.com/foo/bar/index.php ~ www.website2.com/foo/bar/index.php 리디렉션 htaccess로 어떻게 할 수 있습니까? 예를 들어주세요. mod_rewrite 사용할 수htaccess sitea.com/1 to siteb.com/1

답변

2

경우 .htaccesswww.website1.com의에이 코드를 넣을 수 있습니다 :

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^(www\.)?website1\.com$ 
RewriteRule ^(.*)$ http://www.website2.com/$1 [L,QSA,R=301] 

이것은 속임수를 썼는지 website2.com

+0

감사합니다,에 동등한 website1.com에 모든 페이지를 리디렉션합니다. – Thew