Handle_errors limitations

Hi All,

I have a small problem with the caddy directive handle_errors

handle_errors {
		rewrite /{err.status_code}.html
		file_server
	}

This work by redirecting the page to my custom error page 404.html. However it has limitations?? such as in my example below.

exampe.com/abc - this works
example.com/abc/abc - this redirects to caddys 404 page not my custom 404.html page

I’m not able to reproduce. It works in all scenarios. Please fill out the template presented when creating a topic in the Help section.

1 Like

Thank you for your comments, I am still confused.
I don’t know what else to add, it only works for files (pages) in the root directory and does not account for missing files (pages) in sub-directories.

Cheers

1 Like

You’ll have to fill out the template. It’s presented when creating a topic under the Help section. Copy it, fill it, and share it here to help with the troubleshooting.

2 Likes