6 Replies - 3095 Views - Last Post: 13 March 2013 - 08:03 PM

#1 dreamincodehamza  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: -12
  • View blog
  • Posts: 332
  • Joined: 12-September 08

customize error message page

Posted 12 March 2013 - 12:54 PM

How i can detect Custom Error Response if any of them occur on my site.
Errors are
500
404
401
408

Do i need any script or any perfect solution for this.
Please guide me.

thanks

This post has been edited by dreamincodehamza: 12 March 2013 - 01:21 PM

Is This A Good Question/Topic? 0
  • +

Replies To: customize error message page

#2 Koyume  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 89
  • Joined: 19-February 13

Re: customize error message page

Posted 12 March 2013 - 01:00 PM

I'm not understanding what you are wanting to know how to do. The only thing I can understand from your post is that you want some kind of custom error message. For what? Need a purpose and what the error message is for. Is it a 404 custom page you are looking to create? These are just a few things that are needing to be known.
Was This Post Helpful? 0
  • +
  • -

#3 Takk  Icon User is offline

  • D.I.C Head

Reputation: 40
  • View blog
  • Posts: 111
  • Joined: 08-March 13

Re: customize error message page

Posted 12 March 2013 - 01:20 PM

Koyume has it right, but I'll take a stab in the dark and type some..

If you're looking to have custom pages for normal web server errors such as the 404 Document Not Found, etc.. Then you're looking to work with the .htaccess file, it depends on your web server's configuration as to whether these are allowed or not, given they are, you're looking for the ErrorDocument tag which goes with it, the code looks something like

ErrorDocument 404 /my404error.html



I believe the leading / is required. Otherwise, you'll be catching errors in your own code, and how you handle them is pretty much up to you, once we get more info we'll be glad to offer better suggestions.
Was This Post Helpful? 0
  • +
  • -

#4 dreamincodehamza  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: -12
  • View blog
  • Posts: 332
  • Joined: 12-September 08

Re: customize error message page

Posted 12 March 2013 - 01:22 PM

View PostKoyume, on 12 March 2013 - 01:00 PM, said:

I'm not understanding what you are wanting to know how to do. The only thing I can understand from your post is that you want some kind of custom error message. For what? Need a purpose and what the error message is for. Is it a 404 custom page you are looking to create? These are just a few things that are needing to be known.


please read the post again.thanks
Was This Post Helpful? 0
  • +
  • -

#5 Koyume  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 89
  • Joined: 19-February 13

Re: customize error message page

Posted 12 March 2013 - 01:32 PM

Click here for documentation on Custom Error Messages and How to do them

As far as the pages go, they can be just an html page with the basic information.
Was This Post Helpful? 0
  • +
  • -

#6 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3569
  • View blog
  • Posts: 10,402
  • Joined: 08-June 10

Re: customize error message page

Posted 12 March 2013 - 01:41 PM

[moved to Webserver Forum because HTTP errors are not PHP errors]
Was This Post Helpful? 0
  • +
  • -

#7 no2pencil  Icon User is online

  • Admiral Fancy Pants
  • member icon

Reputation: 5379
  • View blog
  • Posts: 27,350
  • Joined: 10-May 07

Re: customize error message page

Posted 13 March 2013 - 08:03 PM

This is handled by your webserver software. In apache there is a section in the httpd.conf file for standard error files. Under nginx you define the page for each error, within each server/domain you are hosting.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1