0

I want to create custom error pages for HTTP Responses of 500, 503, etc. in a Magento 2 project. After turning on "ProxyErrorOverride" from the virtual host, I found that we can use the below code in HTACCESS to redirect to the custom pages.

# for Internal Server Error
ErrorDocument 500 /505.html
# for Service Unavailable
ErrorDocument 503 /503.html
# for Gateway Timeout
ErrorDocument 504 /504.html

But when I turn on "ProxyErrorOverride", the server sets its own 404 page instead of Magento's 404 page.

Can anyone help me to create custom pages like 500, 503, etc. with Magento's 404 page?

  • your server overrides error header, thats why you see 404 from apache. if you need to show magento error page, then you need to pass it to magento, or create 404 same in apache. – MagenX Aug 10 '19 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.