httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] In Rewrite Loop -- please help
Date Mon, 15 Sep 2003 06:20:41 GMT
Timothy Stone wrote:
> I have five domains, all variations on a theme (all examples):
>
> www.mycity.com
> www.mycity.org
> www.mycity.net
> www.mycityevents.com
> www.mycitystate.gov
>
> All five domains are entered in DNS identically for round robin load
> sharing.
>
> Currently, www.mycity.com, acts as the "primary" domain for all of these
> domains. So a client requesting .org|.net|.gov are immediately
> redirected  (R=permanent) to "dot-com" via a RewriteRule (conf follows)
> in a virtual host.

mod_rewrite is complete overkill for such a simple setup, and will likely
cause you unnecessary headaches (as seen in this discussion).

Simply do like this:

    <VirtualHost *>
        ServerName www.mycitystate.gov
        ...
    </VirtualHost>
    <VirtualHost *>
        ServerName www.mycity.com
        ServerAlias www.mycity.org www.mycity.net www.mycityevents.com
        Redirect / http://www.mycitystate.gov/
    </VirtualHost>

Done! Keep It Simple, Stupid! ;)

Regards,
Robert Andersson


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message