Skip to Content.
Sympa Menu

internetworkers - [internetworkers] Apache httpd.conf help

internetworkers AT lists.ibiblio.org

Subject: Internetworkers: http://www.ibiblio.org/internetworkers/

List archive

Chronological Thread  
  • From: "Tony Spencer" <tony AT tonyspencer.com>
  • To: <internetworkers AT lists.ibiblio.org>
  • Subject: [internetworkers] Apache httpd.conf help
  • Date: Wed, 18 Feb 2004 11:13:44 -0500

Does anyone know how to acheive the following with Apache?

I have three domains pointing to the same site:
mydomain.com
mydomain.org
mydomain.net

I want mydomain.org to be the primary domain. If anyone visits the site by
typing mydomain.com or mydomain.net I want Apache to force a HTTP 301
redirect to mydomain.org.


Current httpd.conf settings:
---------------------------
<VirtualHost *>
ServerAlias mydomain.org www.mydomain.org mydomain.com *.mydomain.com
mydomain.net *.mydomain.net
ServerAdmin info AT mydomain.org
DocumentRoot /home/mydomain/wwwroot
ServerName mydomain.org
ErrorLog /home/mydomain/logs/error.log
CustomLog /home/mydomain/logs/access.log combined
ScriptAlias /cgi-bin/ /home/mydomain/wwwroot/cgi-bin/
<IfModule mod_caucho.c>
CauchoConfigFile "/home/mydomain/conf/resin.conf"
<Location /caucho-status>
SetHandler caucho-status
</Location>
</IfModule>
</VirtualHost>
---------------------------

Much thanks in advance


T O N Y S P E N C E R
305 Calvin Rd.
Raleigh, NC 27605
Phone: 919.834.6845
Mobile: 415.637.6481
tony AT tonyspencer.com





Archive powered by MHonArc 2.6.24.

Top of Page