Error Pages with .htaccess

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

Threaded View


I've done the standard old trick of adding the error page line into
..htaccess which works absolutely fine if I accidently go to any file
other than .php  But if I go to "doesntexist.php" I get a different
error message seemingly already installed somewhere on the server.
Does anyone know how to override this? There must be a setting somewhere!

Cheers in advance,

(I know this isn't really the right NG but i hoped someone would know! :)


Re: Error Pages with .htaccess

Adam King wrote:
Quoted text here. Click to load it

Are you getting a standard 404 error page? Then your host doesn't allow
htaccess override.

Test this by making a deliberate error in the .htaccess file, which should
trigger a 500 internal server error when the file is actually interpreted.


Re: Error Pages with .htaccess

Janwillem Borleffs wrote:
Quoted text here. Click to load it

had the same problem. that works for me in .htaccess:

#php files
RewriteEngine On
RewriteCond % !-f
RewriteCond % !-d
RewriteRule (.*) abs_uri_of_your_error_doc
RewriteEngine On
RewriteCond % !-f
RewriteCond % !-d
RewriteRule (.*) uri_of_error_doc
RemoveType x-mapp-php4 .html

#html files
ErrorDocument 404 uri_of_error_doc


Re: Error Pages with .htaccess

Thanks for your advice, I haven't had chance to check it out yet, but
the help is much appreciated!!


Site Timeline