Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Active Server Pages (ASP)
Expertise: Beginner
Oct 5, 2000

Providing a Much Nicer 404 Error

Question:
A user on my site clicks to retrieve a URL outside of my site, but the link is dead and the user receives a 404 error. Do you know of any methods to let me know when this happens? Ideally, I would like to trigger an e-mail to myself using STMP.

Answer:
What you will need to do is to make sure your Web server is set up so that 404 errors are not returned with the default 404 message but instead are sent to your custom ASP page.

Select Web site properties in Windows NT/2000 and under Custom Errors, scroll down to 404. Change it to point to your custom ASP page.

Within your ASP page, you can send an e-mail to yourself, log the error in the database, and return a much nicer 404 message.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap