By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,769 Members | 1,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,769 IT Pros & Developers. It's quick & easy.

Error Pages with .htaccess

P: n/a
Hey,

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! :)

Adam
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Adam King wrote:
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!


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.
JW

Jul 17 '05 #2

P: n/a

Janwillem Borleffs wrote:
Adam King wrote:
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!
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.

JW


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

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

#html files
ErrorDocument 404 uri_of_error_doc

micha

Jul 17 '05 #3

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

Adam
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.