Redirect URL to blocked page locally

Hi,

We have some RB951Ui-2HnD’s, with running RouterOS 6.18

We’re using the hotspot functionality, using radius, and a DST-NAT rule to forward all traffic to our proxy.

BUT: We’re looking to block some websites (ie: facebook.com, youtube.com) on their hostname (not on their IP), but not simply dropping the connection as a firewall rule, but redirecting to a local page hosted in the hotspot folder (http://192.168.88.1/block.html)

Are there any ideas on how to achieve this ?

if i were you, i would do this redirection in the proxy, not in Mikrotik.
If you would like to do it in mikrotik, the firewall, should check the header inside the packet, what would be huge additional load,
and your proxy is doing this every time it forwards a request.