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

Re: [users@httpd] restrict Location URL with special string

On Wed, Jun 13, 2018 at 2:27 PM MOKRANI Rachid <rachid.mokrani@xxxxxxxx> wrote:

> I have URL like below (with ? and =)
> http://myserver/?s=about
> What’s the correct syntax to allow only some IP.
> <Location "/\?s\=about">
> Require ip
> </Location>

<location> only matches the path part of the URL, not the query string
(i.e. the part after the ?).

There's an example for matching QUERY_STRING in

<If "%{QUERY_STRING} =~ /s=about/">
Require ip

may work, but I haven't tested it.


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