Posted on Oct 7, 2011
1. Redirect to a File Not Found page
If a file doesn’t exist, you can redirect your users to a page saying so.
2. Redirect to the correct location of a file
If, for example, your server treats file names with case sensitivity turned on, then a request to abc.php and Abc.php will be different. If all your file names are in lowercase, then a request to Abc.php will return file not found. Fix this by catching the requested file name in your 404 handler, convert it to lowercase, and redirect to the file with all lowercase letters.
3. Redirect a missing page component
4. Vanity / Short URLS
If you have a form at a long URL, e.g. http://www.mysite.com/web/forms/2011/05/19/index.php but you want to market a shorter URL to people like http://www.mysite.com/myevent, you can catch the path to the short URL in your 404 handler and redirect users to the long URL. This way, you don’t have to create actual folders and a file with a redirect in it.