/    Sign up×
Community /Pin to ProfileBookmark

site wide error page?

There are no known errors in my site still as a precaution I want to add a error page for whole site. I mean for any error on any page in whole website, this page will get called. I have done that in coldfusion can it be done in php?

in signle file something like in .htaccess.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@tfk11Jan 15.2008 — There is no such thing as a "site wide" php script. You can however use ErrorDocument directives in .htaccess to configure the web server to use a php script to handle errors... if the server is setup to allow it.
Copy linkTweet thisAlerts:
@SH100authorMay 13.2008 — Thank you this worked.

ErrorDocument 500 http://foo.example.com/cgi-bin/tester

ErrorDocument 404 /cgi-bin/bad_urls.pl

ErrorDocument 401 /subscription_info.html

ErrorDocument 403 "Sorry can't allow you access today"

http://httpd.apache.org/docs/2.0/mod/core.html#errordocument
×

Success!

Help @SH100 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...