I have the following code and the only redirect that seems to be working is the first one. I get 500 errors on the other redirects. Any insight is greatly appreciated.
<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>
Try this: