Apache related - what is causing this?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I've got this in in my .htaccess file:
ErrorDocument 404 /mypage/404.php

But this will result in a 500 Internal Server Error.
When i change the extension to:
ErrorDocument 404 /mypage/404.html
Its works just fine.

Now you should now that the php file doesn't contain
any code, just plain html.

What is causing this, and more important what can i do about it?
It seems to be related with the file extension?

Samul van Laere
the Netherlands

Re: Apache related - what is causing this?


Quoted text here. Click to load it

Does your host use mod_php or PHP CGI?

We use Ensim Webppliance Pro and all our customers are set to High Security
mode.  This mode forces customers websites to use PHP CGI instead of
mod_php.  Apache calls an interpreter script that then calls PHP CGI.

Almost 100% of the time that a customer gets a 500 error related to .php
file it is because of permissions.  In High Security mode, Ensim does not
allow the .php file be owned by anybody except the site admin and the group
and other permissions cannot have write permission enabled.

If you go to http://www.youdomain.tld/404.php does it also generate a 500
error? or only when you call it from .htaccess?  If it also generates a 500
error when called directory, it is probably a permission/security issue
(since you say it is basically an html file with a .php extension and
contains no php code).

Edward Alfert - http://www.rootmode.com /
Discount Code (Recurring 25% Off): newsgroup
Multiple Domain Hosting * Reseller Hosting
Free IP Addresses * Private Label Nameservers

Site Timeline