Re: VirtualHost Redirect with an exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>>
>>
>>
> I have googled some, and everything points to RewriteCond
> Going to try that.
> 
> 
> Thanks,
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 

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

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

With regards,
Daniel.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux