Block Page Not Working

I am trying to get a custom block page to work, have followed several instructions but no luck.

Expected Behaviour:

Receive a custom block page when accessing a website that is on a block list

Actual Behaviour:

Receive an Error 400. Have performed a DNS flush, restarted the pi hole several times, unable to get a block page to work on any device.

Debug Token:

https://tricorder.pi-hole.net/gi8dxwfukq

From your debug log, a few errors shown:

 server.error-handler-404="pihole/CustomBlockPage.htm"

  2020-05-20 14:31:50: (response.c.404) uri-path does not begin with '/': pihole/CustomBlockPage.php -> 400

By comparison, the stock error handler appears as follows:

server.error-handler-404 = "/pihole/index.php"

Note that the block page will only be served for http sites, not for https sites.

1 Like

Please help a noob understand, how do I fix this to get the block page working?

Thank you kindly for your help!

These were the steps I followed to set it up.
Have re-done each of the steps, but still getting the same behaviour.

Any suggestions I can follow please?

Try changing this:

server.error-handler-404="pihole/CustomBlockPage.php"

to this:

server.error-handler-404="/pihole/CustomBlockPage.php"

Making progress. Thank you!

The missing / helped. But now I'm trying to figure out the issue with Chrome wanting to download the page instead of displaying it. Will the PHP option work better?

Just tried it, the PHP page is working awesomely.

Thank you for your help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.