I want to redirect visitors to a certain domain elsewhere, and I want to do the same for several subfolders. DirectAdmin's "Site Redirection" feature generates a .htaccess file looking like this:
Redirect 301 /subfolder1/ https://newdomain.com/subfolder1/
Redirect 301 /subfolder2/ https://newdomain.com/subfolder2/
Redirect 301 /subfolder3/ https://newdomain.com/subfolder3/
Redirect 301 /subfolder4/ https://newdomain.com/subfolder4/
Redirect 301 /subfolder5/ https://newdomain.com/subfolder5/
Redirect 301 / https://newdomain.com/
Which seems fine. However, the last line - redirecting / - takes precedence over all other lines. So redirecting the subfolders *only* seems to work properly when I leave that last line out. I can think of a workaround to fix this outside of the "Site Redirection" feature, but why should that be necessary? When you're taking the trouble to redirect a number of individual pages to individual pages on a new domain, isn't it logical that you'd also want to redirect visitors to the old domain's homepage to the new domain's homepage? I don't entirely understand why I can't do both from the "Site Redirection" feature.
Redirect 301 /subfolder1/ https://newdomain.com/subfolder1/
Redirect 301 /subfolder2/ https://newdomain.com/subfolder2/
Redirect 301 /subfolder3/ https://newdomain.com/subfolder3/
Redirect 301 /subfolder4/ https://newdomain.com/subfolder4/
Redirect 301 /subfolder5/ https://newdomain.com/subfolder5/
Redirect 301 / https://newdomain.com/
Which seems fine. However, the last line - redirecting / - takes precedence over all other lines. So redirecting the subfolders *only* seems to work properly when I leave that last line out. I can think of a workaround to fix this outside of the "Site Redirection" feature, but why should that be necessary? When you're taking the trouble to redirect a number of individual pages to individual pages on a new domain, isn't it logical that you'd also want to redirect visitors to the old domain's homepage to the new domain's homepage? I don't entirely understand why I can't do both from the "Site Redirection" feature.