Saturday, 15 May 2010

.htaccess - Custom 404 error page is generating a 500 error -



.htaccess - Custom 404 error page is generating a 500 error -

for security reasons, making php files generate 404 error, using custom 404 error page, so:

rewritecond %{the_request} \.php[\ /?].*http/ rewriterule ^.*$ - [r=404,l] errordocument 404 /error.html

any php script go returns custom 404 error page, like, below says:

additionally, 500 internal server error error encountered while trying utilize errordocument handle request.

but when go page doesn't exist (lets http://localhost/hello/world.html) error page want.

i'm confused, doing wrong. also, able utilize php pagefor custom errordocument, i'm not sure if that's possible.

you should seek redirect match:

redirectmatch 404 ".*\.php"

this pass not found error, , throw appropriate errordocument.

.htaccess http-status-code-404 errordocument custom-error-handling

No comments:

Post a Comment