Browse DevX
Sign up for e-mail newsletters from DevX

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



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Providing a Much Nicer 404 Error

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.

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
Thanks for your registration, follow us on our social networks to keep up-to-date