Custom Error Pages with .htaccess



Ok, we’ve looked at controlling access to directories with .htaccess, but there are other neat tricks we can do that can add a bit of polish to your site.

One that I’ve implemented lately is a custom error page. Now, we’ve all done this, clicked on a link and get a page that says Error 404 page not found. This is the standard code for “it’s not here anymore.” I noticed at one point I was getting a LOT of 404 errors looking for files that had simply moved, so I did the following.

I created a page that looked like the main theme on the website and named it error.html (I might move it to error404.html soon.) The main contents of the page say the page you tried to access is no longer there it may have been renamed or moved, it gives links to either this site, or the North Carolina Genealogy site which is hosted on the same machine. After 10-15 seconds I’ve done a redirect to the North Carolina Genealogy site since most of the 404 errors were for pages related to that site.

If you’re curious on how to setup a page that refreshes/redirects take a look at Creating a Redirect Page

Related Posts

Blog Traffic Exchange Related Posts
  • Yahoo moves to offer RSS reading Yahoo is offering RSS reading through email folders, in part countering moves by Google with their Reader web-based RSS aggregator. Apparently, posts show up looking like mail messages and can be forwarded or read in a way similar to the way mail is dealt with. They've also launched a beta......
  • A couple interesting online Advertising notes I've run across a couple of interesting things. The first was linked to from the second one I'll mention. I know, some time back, I visited a publicly available Google Adsense tool a few months back and at that time found an interesting tool that gave you keyword suggestions based......
  • Saving you from yourself or specifying which index file to use with apache As I said, I mistakenly uploaded a page of links that I use for the main administration across many sites to this domain. Unfortunately, the server preferred using the index.html to the index.php that serves up the USUAL home page. So, for about an hour after my slipup.... the main......
Blog Traffic Exchange Related Websites
  • Picking Out A Good Web Host For Your Site Selecting the right web host can make or break your website. This is because the hosting service that is responsible for your website acts like its foundation. In order to have a longer term web presence and make sure that you visitors enjoy their time on your website, you have......
  • How To Adjust Web Hosting Devoid Of Downtime I am positive that if you are visiting this page, you will be interested in change web hosting. Changing from a single internet hosting provider to a different can cause downtime if you do not have the necessary abilities and experience. Here is a step by step guide to aid......
  • Using Managed Dedicated Web Hosting Managed dedicated web hosting is for an individual or organization that wants storage and bandwidth with out the restrictions that you get by choosing a free of charge web hosting service.  Should you have a website which you would like to have much more bells and whistles programmed into it,......
PDF24    Send article as PDF   

Similar Posts


See what happened this day in history from either BBC Wikipedia
Search:
Keywords:
Amazon Logo

Comments are closed.


Switch to our mobile site