Hello,
CNAMES are evil! (To quote Brian, and they are)
You will need to edit the config file for apache to do what you want. They are
located here "/etc/httpd/conf/vhosts". Edit the file belonging to your site
(sitex). Open the file with pico, and comment out these two lines.
RewriteCond %{HTTP_HOST} !^www.domain.tld(:80)?$ [NC]
RewriteRule ^/(.*) http://www.domain.tld/$1 [L,R]
Save and restart apache (/sbin/service httpd restart)
To find the site# associated with a domain, cd to "/home/sites" and do a "ls -
lrta" this will list the directory and show where the symlinks point to.
lrwxrwxrwx 1 root root 18 Nov 1 17:37 www.domain.tld-> ../.sites/39/site9
On Fri, 23 Jan 2009 15:19:22 -0000, Howie Dines wrote
> I've had a few problems with this. The only way I can get it to work
> is:-
>
> Site Management>(Edit Virtual Site)>Services>web>
> then add other domains that you want to point at the vsite as aliases.
> (with and without the hostname)
>
> Then
>
> Server Management>Network Services>DNS>Edit Primary Services>Add Alias
> (CNAME) Record
>
> It goes against what everyone says as some say add (A) record in place
> of CNAME, but it seems to work for me.
>
> Best Regards
> Howie
> www.dincom.co.uk/bq
>
> -----Original Message-----
> From: Martyn Bailey [mailto:martyn (at mark) solis.co.uk]
> Sent: 23 January 2009 14:28
> To: coba-e (at mark) bluequartz.org
> Subject: [coba-e:14845] Site alias reflect domain?
>
> I've had a question from a customer about adding an alias to a vsite.
>
> Basically they'd like to use three different, unconnected domain names
> all pointing toward the same vsite, and have the site honour the
> domain used, rather than serving the site and changing the ULR to the
> 'main' site name.
>
> Hope that makes sense!
>
> Any pointers much appreciated.
--
Lucas Peyatt
Ohio Web Hosting & Design
lucas (at mark) ohiowebhosting.net
www.ohiowebhosting.net
937.969.4476 dayton
614.441.8169 columbus
513.258.2376 cincinnati
206.350.1292 facsimile