Re: Canonicalizing Domains / Hostnames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It was thus said that the Great Michael B Allen once stated:
> Hi All,
> 
> I have a site that is accessible through multiple hostnames like:
> 
>   http://www.busicorp.com/
>   http://server123.vps.hosting.net/
>   http://busicorp.com/
> 
> but I only want the site to be accessible through the first hostname
> (http://www.busicorp.com/ and https://www.busicorp.com/). How can I
> block these other hostnames? I have been using Apache for many years
> but I'm drawing a blank as to where to begin with this. Can someone
> give me a pointer?

  The easiest might be to set the non-preferred domains to redirect to the
preferred domain.  Something like:

<VirtualHost 205.186.183.199:80>
  ServerName    server123.vps.hosting.net busicorp.com
  Redirect      permanent       /       http://www.busicorp.com/
</VirtualHost>

  That will redirect all requests to server123.vps.hosting.net and
busicorp.com to your preferred domain name, and at least as far as Google
goes, the Page Rank for the non-preferred sites will be transferred to the
preferred domain name.

  -spc


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux