We have reviewed your configuration file sent by email and have even reproduced the behavior: As expected, it was caused by the URL rewriting rules which are configured to act even for internal requests.
Short answer: Disable Apply to subrequests too in URL rewriting rules (https://aprelium.com/data/doc/2/abyssws-win-doc-html/hosts-configuration.html#HOSTS-URLREWRITE-RULES-SUBREQUESTS)
Long answer: Since custom error pages are served as internal requests, they were subject to the URL rewriting rule and a full redirect was performed instead of serving them normally.
Actually, a custom error page associated with error 404 and with path /assets/error/404.html will be processed as follows:
- A user visits virtual path
/notthere and error 404 is generated internally
- Abyss Web Server will run its error handlers to decide what to report for that error
- Since there is custom error page for 404 with virtual path
/assets/error/404.html, Abyss Web Server will "simulate" an internal request for that virtual path to get its content.
- If such internal request results in status code 200, the original request is served with status code 404 and with the content downloaded internally for
/assets/error/404.html
- But in our case, the internal request matched with a URL rewriting rule and resulted in an external redirection with a 301 status code. So the reply for the original request was a 301 redirect with that redirection. Error 404 was not reported as the internal request was not "clean" and did not report status code 200.