다음 코드가 있으며 작동하는 것으로 보이는 유일한 리디렉션이 첫 번째 것입니다. 다른 리디렉션에서 500 개의 오류가 발생합니다. 어떤 통찰력이라도 대단히 감사하겠습니다.하위 도메인을 새 하위 도메인으로 리디렉션하기 위해 여러 RewriteCond가 있습니다.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^test1.domain.com
RewriteRule (.*) http://s.domain.com/sub1/$1 [L]
RewriteCond %{HTTP_HOST} ^test2.domain.com
RewriteRule (.*) http://s.domain.com/sub2/$1 [L]
RewriteCond %{HTTP_HOST} ^test3.domain.com
RewriteRule (.*) http://s.domain.com/sub3/$1 [L]
</IfModule>
내가 추가 제안 오류 http://stackoverflow.com/questions/7746769/log-of-apache-rewrites –
원인을 볼 수 RewriteLog 수 있도록 시도 R 플래그. 그래서'[L]'은'[L, R]'이 될 것입니다. – Gerben
트릭을 한 @Gerben. 고맙습니다! – jeffreynolte