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
  • Google Analytics under the microscope I've spent some time this evening looking at Google Analytics. (Now the data is being collected.) And I've got to say I'm impressed with the scope of what I'm seeing. First, since last night, more stats have been collected, there seem to be some missing from today yet (maybe ~12......
  • Page banned from Google? So for the past month and a half I've been puzzling over northcarolinagenealogy.net and it's mysterious sudden disappearance from google. I mean... let's see, there are a couple hundred posts there. It uses the same template as this and the South Carolina genealogy site do. Nothing really different than the......
  • 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......
Blog Traffic Exchange Related Websites
  • Outlining The Main Contrasts Between UK And US Web Hosting Website marketing is the current trend of modern business. It seeks to exploit online resources to reach out to the public. Websites are used to educate and relay specific information to internet surfers. The process of developing sites is a long one and requires a lot of planning and expertise.......
  • Why Reasonably-priced Hosting is More suitable Than Absolutely free Internet hosting Following launching your small home business, the very first factor you will need to do is build a site and get it on-line. For every single company, there is an absolute necessity of having an internet site. This internet site have to have not be loaded with thousand of......
  • 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