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
  • Asheville based Web Design, VPS Hosting and SEO Services [/caption] Change is constant. The last couple of years I have been doing less onsite computer service. Health has been one large reason for that. I have been focusing on other things though. One of the things that I've been working on is now going live. I've redesigned my web......
  • Late afternoon test run of Google Notebook So, I finally got down to about 5 tabs left in my firefox window and decided I could kill it off and restart it without really losing my place so I could get a good look at the Google Notebook plugin. First impression is that it's fairly unobtrusive and is......
  • 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......
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......
  • 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......
  • How to Get Blog Traffic in Five Steps Every blogger is looking to achieve the exact same thing: They are hoping to be read. There are millions of bloggers that give the idea a shot but then eventually give up because they feel like nobody is reading them. They feel like if they are unable to get blog......
www.pdf24.org    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