httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel <dferra...@gmail.com>
Subject Re: [users@httpd] Negate Regex with LocationMatch help Needed
Date Wed, 06 May 2015 07:35:43 GMT
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@gmail.com> 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
>

Mime
View raw message