1

我想将以邮件开头的网络服务器站点的所有子域重定向到https://anotherSub.domain.com

我该怎么做?

Put this at the top of the yours default apache config file
RewriteEngine on  
RewriteCond %{HTTP_HOST} ^SUBDOMAIN.* 
RewriteRule ^(.*) YOUR LINK (ex. http://www.google.it)
4

1 回答 1

1

mail此代码匹配任何以on开头的子域domain.com并将其重写为https://anothersub.domain.com.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mail(.*?).domain.com [NC]
RewriteRule ^(.*)$ https://anothersub.domain.com/$1 [L, 301]
于 2013-05-20T21:46:14.697 回答