On Wed, Jun 13, 2018 at 2:27 PM MOKRANI Rachid <rachid.mokr...@ifpen.fr> 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 127.0.0.1
> </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
https://httpd.apache.org/docs/2.4/en/mod/core.html#if

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

may work, but I haven't tested it.


rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to