SoCkEt7
SoCkEt7

Reputation: 2277

Can't redirect to a maintenance page when serveur return 500 Internal server error

Ive made this .htaccess file

ErrorDocument 404 /404.php
ErrorDocument 500 /maintenance.php

But when i try to access to http://www.mupiz.com/admin/TESTS.php (there's a parse error in it)

The serveur does not redirect to maintenance.php

Any ideas ?

Thanks

Upvotes: 0

Views: 456

Answers (1)

anubhava
anubhava

Reputation: 785521

You have some confusion about custom error handling.

500 is for Internal Server Error in Apache before it invokes PHP module. Once PHP module is invoked it is up to the PHP to handle everything. Parse error anyway is not a 500 and even if you make PHP cause 500, Apache's 500 handler won't be invoked.

Upvotes: 1

Related Questions