[plug] Apache Rewrite/Redirect

Nathan Alberti nathan at nathanalberti.com
Wed Aug 4 09:22:52 WST 2004



RewriteEngine On
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}$1 [R=301]
			      ^
Looks the goods, just doing some more testing.

Cheers James.

Nathan.

On Wed, 2004-08-04 at 08:37, James Devenish wrote:
> In message <1091580470.1087.137.camel at nathan>
> on Wed, Aug 04, 2004 at 08:47:50AM +0800, Nathan Alberti wrote:
> > 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.
> > all I'm really looking to do is set up a rewrite/re-direct
> 
> How about putting the redirection in to the "com" configuration?
> That is, the "com" configuration would contain something
> semantically equivalent this pseudo-configuration:
> 
> RewriteEngine On
> RewriteRule ^(.*)$ http://www.${HTTP_HOST}$1 [R=301]
> 
> That is, the above "com" configuration might work for all hosted
> values of domain.com.
> 
> 
> _______________________________________________
> PLUG discussion list: plug at plug.linux.org.au
> http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au




More information about the plug mailing list