RedirectMatch and ProxyPass

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

 



Hello,

I have the following virtual host configuration :

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

<VirtualHost *:80>
    ServerName www.foo.be
    ServerAlias www.fooa.be www.foob.be www.foobar.be

    DocumentRoot /usr/local/www/apache22/www/www.foo.be/amnesia/public

    RedirectMatch permanent ^/bbpf(.*) http://www.foo.be$1
    RedirectMatch permanent ^/biotraining(.*) http://www.foo.be/602
    RedirectMatch permanent ^/(ext/)?changes?(.*) http://www.foo.be/25
    RedirectMatch permanent ^/invasions(.*) http://bar.foo.be

    <Directory /usr/local/www/apache22/www/www.foo.be/amnesia/public>
        Order allow,deny
        Allow from all
    </Directory>

    ##############
    # Biodiversa #
    ##############

    ProxyPass /biodiversa ajp://127.0.0.1:8009/biodiversa retry=20
    ProxyPassReverse /biodiversa ajp://127.0.0.1:8009/biodiversa

    ###############
    # Main portal #
    ###############

    ProxyPassMatch /(files|images|js|styles) !

    ProxyPass / http://127.0.0.1:5006/ retry=10
    ProxyPassReverse / http://127.0.0.1:5006/

</VirtualHost>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The problem I have is that the RedirectMatch directives don't work, unless I add them in my "ProxyPassMatch ... !" directive (which is a bit boring, because I have to copy/paste every RedirectMatch pattern).

It seems that the request goes first through mod_proxy and then only through mod_alias, event it the mod_alias directives (RedirectMatch) appear first ... is it a normal behavior ?

Is there a clean way to do what I want to do, without involving mod_rewrite if possible ?

Thanks,
Julien


--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
begin:vcard
fn:Julien Cigar
n:Cigar;Julien
org;quoted-printable:Belgian Biodiversity Platform;ULB (Universit=C3=A9 Libre de Bruxelles)
adr:;;;Brussels;;;Belgium
email;internet:jcigar@xxxxxxxxx
tel;work:+32(0)26505752
x-mozilla-html:FALSE
url:http://www.biodiversity.be
version:2.1
end:vcard


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-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