httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Gruno <rum...@cord.dk>
Subject Re: [users@httpd] VirtualHost Redirect with an exception
Date Tue, 18 Dec 2012 11:23:07 GMT
On 12/18/2012 12:18 PM, Coert Waagmeester wrote:
> 
> 
> On 2012/12/18 11:53 AM, Coert Waagmeester wrote:
>> Hello all,
>>
>> We run a webserver with multiple domains pointing to it.
>>
>> Only one DNS name is used to serve our website.
>> All the other DNS names (which exist for purposes other than www) I
>> redirect to our main DNS name.
>>
>> <VirtualHost *:80>
>>      ServerName mysvcname.net
>>      ServerAlias www.mysvcname.net
>>      Redirect / http://www.mywwwname.net
>> </VirtualHost>
>>
>> This works perfectly, but on one of the machines where I have this
>> Redirect, I am running mailman which used to listen on
>> mysvcname.net/mailman which also gets Redirected now wrongly.
>>
>> Can I add an exception in someway that mysvcname.net gets redirected,
>> but mysvcname.net/mailman stays as it should?
>>
>>
>> Thank you in advance,
>> Coert Waagmeester
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>>
> I have googled some, and everything points to RewriteCond
> Going to try that.
> 
> 
> Thanks,
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

Use RedirectMatch with a negative lookahead instead, for better
performance and clarity:

RedirectMatch ^/(?!mailman)(.*) /$1

With regards,
Daniel.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message