The next .htaccess
code redirects example.com
(from /public_html root folder) to the subdomain1.example.com
(to /public_html/subdomain1 subdolder) and an old page register to a new one at subdomain1.example.com/enroll
. So far so good! But, I have also a subdomain subdomain2.example.com
(in the /public_html/subdomain2 subfolder) that instead of his normal URL is redirected to the subdomain1.example.com/subfolder2
, that not exists. Why this happens and how to avoid this?
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://subdomain1.example com/$1 [R=301,L]
Redirect 301 /register http://subdomain1.example com/enroll