We have a central httpd.conf and we include confs for various virtual hosts. Until today, we didn't really have a need for "www.subdomain.site.com" domains, only "subdomain.site.com." Now we do, so I am trying to figure out which of these two approaches is better:
[1]. Use a Rewrite:
RewriteCond %{HTTP_HOST} ^www.subdomain.site.com
RewriteRule ^(.*)$ http://subdomain.site.com$1 [R=301]
OR
[2]. Use ServerAlais:
<VirtualHost 111.22.33.44:80>
ServerName subdomain.site.com
ServerAlias www.subdomain.site.com
Include conf/subdomain.conf
</VirtualHost>
I imagine there is more processing on the Rewrite, but unsure of how ServerAlias would behave in this mix. Does one get better SEO foo than the other?
Any and all ideas welcome!
Thanks,
KM