[mdlug] Apache rewrite not working

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


Actually we tried that syntax too, no luck.  -Mike

-----Original Message-----
>From: "Carl T. Miller" <carl at carltm.com>
>Sent: Apr 29, 2011 8:52 AM
>To: MDLUG's Main discussion list <mdlug at mdlug.org>
>Subject: Re: [mdlug] Apache rewrite not working
>
>Michael ORourke wrote:
>> 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]
>
>
>I've never seen the [OR] added to a RewriteCond.  Just for
>grins, see if this works.
>
>  RewriteCond %{HTTP_HOST} ^example\.com
>  RewriteRule ^(.*)$ http://www.example.com [R=permanent,L]
>  RewriteCond %(HTTP_HOST) ^www\.newsite\.com
>  RewriteRule ^(.*)$ http://www.example.com [R=permanent,L]
>  RewriteCond %(HTTP_HOST) ^newsite\.com
>  RewriteRule ^(.*)$ http://www.example.com [R=permanent,L]
>
>c
>
>
>_______________________________________________
>mdlug mailing list
>mdlug at mdlug.org
>http://mdlug.org/mailman/listinfo/mdlug




More information about the mdlug mailing list