[mdlug] Apache rewrite not working

Michael ORourke mrorourke at earthlink.net
Fri Apr 29 10:20:06 EDT 2011


Yes...several restarts.

-----Original Message-----
>From: mat.enders at gmail.com
>Sent: Apr 29, 2011 8:49 AM
>To: MDLUG's Main discussion list <mdlug at mdlug.org>
>Subject: Re: [mdlug] Apache rewrite not working
>
>Sorry but let's get the obvious out af the way first. Have you restarted Apache since adding the rule. 
>Sent on the Sprint® Now Network from my BlackBerry®
>
>-----Original Message-----
>From: "Michael ORourke" <mrorourke at earthlink.net>
>Sender: mdlug-bounces at mdlug.org
>Date: Fri, 29 Apr 2011 08:45:09 
>To: MDLUG's main mailing list<mdlug at mdlug.org>
>Reply-To: MDLUG's Main discussion list <mdlug at mdlug.org>
>Subject: [mdlug] Apache rewrite not working
>
>Lug Nuts,
>
>I am running into a problem with an Apache rewrite rule, here's the format 
>of the vhost config file I am using:
>
>Listen  x.x.x.x:80
><VirtualHost x.x.x.x:80>
>    ServerName www.example.com
>    ServerAlias www.newsite.com
>    RewriteEngine on
>    RewriteCond %{HTTP_HOST} ^example\.com [OR]
>    RewriteCond %(HTTP_HOST) ^www\.newsite\.com [OR]
>    RewriteCond %(HTTP_HOST) ^newsite\.com
>    RewriteRule ^(.*)$ http://www.example.com [R=permanent,L]
>
>The DNS records for both the domains point to the same public address.
>Site Newsite should redirect to www.example.com
>The first rule for adding www. to example.com does work but neither of the 
>newsite rules does.
>I have the same format working for a different site and different virtual 
>host, but the redirect for www.newsite.com does not work.
>
>Any ideas?
>
>Thanks,
>Mike
>
>
>
>
>
>
>_______________________________________________
>mdlug mailing list
>mdlug at mdlug.org
>http://mdlug.org/mailman/listinfo/mdlug
>_______________________________________________
>mdlug mailing list
>mdlug at mdlug.org
>http://mdlug.org/mailman/listinfo/mdlug




More information about the mdlug mailing list