下一个.htaccess 代码重定向example.com (从public\\u html根文件夹)到subdomain1.example.com (到public\\u html/subdomain1 subdolder)并将旧页注册到新页subdomain1.example.com/enroll. 到目前为止还不错!但是,我还有一个子域subdomain2.example.com (在public\\u html/subdomain2子文件夹中)将其重定向到subdomain1.example.com/subfolder2, 不存在的。为什么会发生这种情况以及如何避免这种情况?
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://subdomain1.example com/$1 [R=301,L]
Redirect 301 /register http://subdomain1.example com/enroll