Custom 404 error page with css and image

You can use the handle directive to make mutually exclusive routes in the same site:

What you haven’t shown us is what the error HTML files look like – what kind of URLs does it craft for its related files? Does it use /error/ as a path prefix? If so then you can match requests to /error/* and handle those separately.