[plug] Apache Rewrite/Redirect

Nathan Alberti nathan at nathanalberti.com
Wed Aug 4 08:47:50 WST 2004


I need have a number of virtual hosts that have both www.domain.com and
domain.com pointing to the same data and im looking to use the apache
mod_vhost module to cut down on the bulk of the required configuration
in httpd.conf.

long story short 

www.domain.com = /var/vhosts/domain.com which is fine
but domain.com = /var/vhosts/com as the first part of the domain is
chomped.

Im sure there are a number of ways around this but all im really looking
to do is set up a rewrite/re-direct  that will make all requests to
domain.com ==> www.domain.com, I found alot of information on re-writing
after the initial hostname but could not seem to make it work for
rewriting before.


TIA,

Nathan.




More information about the plug mailing list