How to redirect multiple folders to the reflecting subdomain with .htaccess
- by helmi
Hi,
i tried redirecting some folders to the subdomains with the same names as the folders. I tried this way but it didn't work:
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(test1|test2)(.*?)$ http://$1.domain.com$2 [R=301,L]
I guess the problem is that the alternation of folders doesn't return a result that i can get into $1, right?
I'm not a PCRE expert so andy help would be appreciated.