[wp-hackers] OT: htaccess and two domains...
jeremy.visser at gmail.com
Wed Mar 19 22:12:48 GMT 2008
On Wed, 2008-03-19 at 10:21 -0700, Aaron D. Campbell wrote:
> If you want to redirect them, honestly, this is better done using a
> ServerAlias directive for your VirtualHost in your apache conf (if you can):
> <VirtualHost XXX.XXX.XXX.XXX:80>
> ServerName domain.com
> ServerAlias www.domain.com
> ServerAlias domain.net
> ServerAlias www.domain.net
This is absolutely the way to do it. All you have to do is add a
ServerAlias, and then WordPress' Canonical URLs feature will
automagically redirect you.
You don't need to do _anything_ else. No .htaccess redirects, no
nothin'. Just the ServerAlias.
If I remember correctly, Spencer uses DreamHost. You can't edit the
Apache config, but you can add domains that "mirror" another domain
exactly, which is basically the same as ServerAlias.
Jeremy Visser http://jeremy.visser.name/
() ascii ribbon campaign — against HTML e-mail
More information about the wp-hackers