Re: Negate Regex with LocationMatch help Needed

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

 



Just as workaround have you tried to define the third Location as "three" and make a redirectmatch to it with the negative lookahead instead? If you still want to push for that locationmatch maybe you would need to specify a ".*" at the end.

It is probably a better solution in the long run to just make a separate specific third location and redirect to it, at least i dont like to use too greedy ones.

El 6/5/2015 6:02, "ਜਤਿੰਦਰ ਸਿੰਘ" <jatindersingh84@xxxxxxxxx> escribió:

Hello Team,

I am trying to match below conditions.

1) host:port/one --> matches 1st location directive only.
2) host:port/two --> matches 2nd location directive only.
3) All Other than host:port/one OR host:port/two --> matches 3rd location directive (including root host:port/).

<Location /one>
        WLSRequest On
        WebLogicHost xxxx
        WebLogicPort yyyy
</Location>

<Location /two>
        WLSRequest On
        WebLogicHost xxxx
        WebLogicPort yyyy
</Location>

<LocationMatch "^/(?!one|two)">
        WLSRequest On
        WebLogicHost xxxx
        WebLogicPort yyyy
</LocationMatch>

when i try like host:port/aaa - it gives 404 as it doesnt matches any context, however i expect it to match last one.
I have tried lot of combinations so far but doesn't seem to find it working yet. Any suggestions Masters.

Apache/2.4.12 (Unix)
SunOS  5.10 Generic_150400-14 sun4u sparc SUNW,Netra-T12
--
Regards || Jatinder Singh

[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