Custom Error Page - Posted (1481 Views)
Junior Member
TastyNutz
Posts: 251
251
Does anyone have a good custom error page for Snitz?
I'd like an error page which is more inviting and helpful than standard errors pages. I want something like THIS PAGE, which includes my forum header, menus, login, ect., and which also captures the referring page and bad URL, and emails/logs the error for follow up.
I'm NOT a programmer. So, before I spend all the extra time it will surely take me to research and develop this on my own, I thought I'd ask if anyone has done this already, and wouldn't mind sharing.
Anyone? smile<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Senior Member
leatherlips
Posts: 1838
1838
I'm not aware of a Snitz custom error page. However you should be able to set up your own custom error page with your host. I made one myself for my site and it is very easy to do. Depending on your host, you just need to assign your page to be the default error page.<
Posted
Junior Member
TastyNutz
Posts: 251
251
I understand assigning the page. But I need to create the page first. I was asking if anyone has already created one with the features I mentioned.<
Posted
Senior Member
leatherlips
Posts: 1838
1838
Sorry about that. blush
I found an article that contains some code that could help get you started...
Click here<
Posted
Junior Member
TastyNutz
Posts: 251
251
Thanks. I read that before posting here. But I'm still hoping someone has already done one I can borrow.<
Posted
Support Moderator
pdrg
Posts: 2897
2897
It's a 404 handler, you also should make a 500-handler (script error)

You do this by creating special files and putting them on your server, and setting IIS to use your pages instead of the default

You would create a 404.asp file which would stash the details you're after to a db. You can't do this unless you have Admin-level access to the server (which I suspect you don't, if you're not programmer-level)

hth<
Posted
Junior Member
TastyNutz
Posts: 251
251
No offense guys, but I guess I didn't make myself clear. I know WHAT to do, and HOW to do (most of) it. I just wasn't sure I could figure out how to create the custom error page and make it do what I wanted. Turns out, I could! And it wasn't as complicated as I thought.

Doing what I do best, I reverse engineered a couple files and cobbled together what I needed. I started with the page leatherlips linked above, added some code stolen from ruirib's email spam MOD, and came up with this:

Custom Error Page
It has a general error page with a 404 error include. I'll add additional error includes later.


It doesn't log to a DB, but it does email an error report.*

So? What do you think? Not bad for an amateur? smile
*The file in the .zip emails the report to the forum webmaster. For this demo, I changed that to a dedicated email address to keep from clogging my inbox.<
Posted
Junior Member
TastyNutz
Posts: 251
251

*correction... This won't work after all.
By using my forum headers, this setup works properly ONLY if the missing page is a url within the /forum folder. e.g. /forum/missingpage.asp
If it's a url outside the /forum folder, the error page is displayed, but all images and menus are missing, because the relative paths don't work outside the forum folder. So, the page does not display properly and without the menu links, it defeats what I wanted. Plus, it generates an email for each image it can't find. That's about 35 emails.
I guess I'll just create a basic page with simple links to the forum. blackeye The user will still get helped and I'll still get my error report. It just won't look like a standard forum page with the header menus. sad<
 
You Must enter a message