Captive Portal Whitelist - how to allow and deny path for the same domain?

Hello,

I am trying to add a whitelist to walled-garden to allow www.google.com/ads and deny www.google.com/gen_204
But test result show both paths are allow on the captive portal.
Is there anyway to implement it on RouterOS?

Thanks.

What are your exact rules and test? We’re not telepathists.

After I added the following two entries to walled-garden whitelist:

add method=GET dst-host=“www.google.com” path=“/ads/*” action=allow disabled=no
add method=GET dst-host=“www.google.com” path=“/gen_204” action=deny disabled=no

I can hit www.google.com/gen_204 pre-auth.

Does the ‘Hits’ counter increase when you check it?

What version of RouterOS do you use?

In my tests, I get “HTTP/1.1 302 Hotspot login required” response for your rules.

Hi Chupaka, thanks for your reply. I am using RB951Ui-2HnD with RouterOS 6.42.10
I am going to do more tests and let you know the result.