我目前在apache上有一个通配符的子域:
<VirtualHost xxx.xxx.xxx.xxx:80>
DocumentRoot /home/web/domaine.tld/www
ServerName domaine.tld
ServerAlias *.domaine.tld
VirtualDocumentRoot /home/web/domaine.tld/%1
CustomLog /var/log/apache2/domaine.tld/access.log combined
ErrorLog /var/log/apache2/domaine.tld/error.log
</VirtualHost>并且需要将任何子域(如sub.domain.tld )重定向到domain.tld
发布于 2012-10-26 06:07:01
您可以通过.htaccess使用重定向
Redirect http://sub.domain.tld http://domain.tldhttps://stackoverflow.com/questions/13077375
复制相似问题