Taking control of 404

I’ve been given a requirement to provide some “marketing” URLs on one of our websites. These URLS will then be advertised and we can see which work and which don’t. The URLs will change each month with new one’s being required. So.. thinking back to a solution that a friend used, I’ve decided to do it by processing the 404 request and if the requested URL is in the database, do a redirect and if it isn’t provide a nice error page of some sort.

Doing via a database means that I can write an admin page that will allow the bods upstairs to do the changes each month and I won’t be bothered :)

Also, I need to store the request counts in a database as the standard webserver logs don’t contain the information required. No great hardship and providing some simple stats is easy enough.

All in all a good solution and I’m glad Cliff told me about about his solution to a related problem :)