将旧域的子域redirect到新域中的目录
我想将旧域的子域redirect到新域的目录。 例如forum.old-domain.com应该redirect到new-domain.com/forum从old-domain.comredirect到www.new-domain.com正在工作,除了子域。 htaccess看起来像这样: Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^forum\.old-domain\.de [nc] rewriterule ^(.*)$ http://www.new-domain.de/forum/$1 [r=301,nc,l] rewritecond %{http_host} !^www.new-domain.de [nc] rewriterule ^(.*)$ http://www.new-domain.de/$1 [r=301,nc,l] # rewritecond %{http_host} ^forum.old-domain.de [nc] # rewriterule ^(.*)$ http://www.new-domain.de/forum/$1 [r=301,nc,l] rewritecond %{http_host} ^old-domain.de [nc] rewriterule ^(.*)$ http://www.new-domain.de/$1 [r=301,nc,l] rewritecond %{http_host} ^www.old-domain.de [nc] rewriterule ^(.*)$ http://www.new-domain.de/$1 [r=301,nc,l] 问题是,forum.old-domain.comredirect到www.new-domain.com,但我希望它redirect到www.new-domain.com/forum。 有什么build议么? 我错过了什么? 提前致谢! 编辑: 添加虚拟主机条目: […]