.htaccess to Mask Errors on Your Website



Get Web Design Tips and Tricks on mps-web-design.com. .htaccess to Mask Errors on Your Website topic will increase your understanding on Web Design Tips and Tricks. We at mps-web-design.com only provide news, articles, information in Web Design Tips and Tricks. Web Design Tips and Tricks at mps-web-design.com provides the most up to date news and articles. If you have questions please do not hesitate to contact us.

The .htaccess file is a control file located in your webservers directory. This file is a very powerful file that can control access to certain files, restrict access to files, forward people in the event of errors, and many more useful features for webmasters!

One of the most embarrassing things for a webmaster is to have a website with dead links, bad URLs, and error messages when the user surfs through your website. Using the .htaccess file you can help reduce how noticeable those errors are by quickly moving the user to a correct working location. This method of course doesn't correct the underlying problem with your website, however it does help to keep your website looking more professional.

Common error codes that you want to try to hide from the user:

400 - Bad Request
401 - Authorization Required
403 - Forbidden
404 - Page Not Found
500 - Internal Server Error
501 - Not Implemented

The biggest and most common error by far is the 404 Error (Page not found), but all of these can be embarrassing and troublesome to webmasters. If an error occurs on your website you don't want to lose that user. You may not be able to provide them with a link to the page they wanted, but you might get another chance if you redirect them to another page within your website.

Syntax for .htaccess file:

ErrorDocument ### index.php -- Example of format
ErrorDocument 404 /index.php -- Working example

In the second example, should a user request a page that no longer exists on your website, they will automatically have the index.php file loaded. This can be done for all of the error codes listed above and will help to hide and glaring mistakes in your website.

As I mentioned before, this is not a fix action for your website, but simply a mask. It's very important to review your website logs and look for error codes. The goal is to have a good working website afterall!



Instant Article Submitter. - Amazing Breakthrough Software Stuffs Any Website You Want Full Of Free Targeted Traffic.
15,000 Mb Hosting For $4.95/mo. - 4.95 web hosting, Free domain registration! Free setup and online website builder included.

Did you know Headscape are still looking to recruit two web developers? Even if you aren’t a web developer yourself, read on as we are offering a £500 reward if you find us the perfect person. We have been looking for a while and despite loads of applicants, we are yet to find the perfect [...]


Article Index: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79


More Articles:


1. Clever Web Designing hints
Some software tools are claiming that designing is easy as 123 and that they will ‘produce’ the pages for you. Unfortunately, a number of web designers are victimized by this marketing gimmick. The results are obvious. A number of operating systems have pages that are not seen properly by the intended surfers. Some are unreadable. Some are difficult to navigate. Most of them do not serve their purpose.To help some amateur web designers out there, I have here a list of established rules of thumb …

2. Color and Web Design By Colleen Happ
Color is one of the most important but least understood elements of web design today. Whether they know it or not, visitors to a site respond to colors and other visual elements on the site on a psychological level. Color affects the emotion of the audience, and emotion drives decision-making. An intrigued visitor is more likely to engage in the goal of your site -- whether it is meant to inform, entertain, or to sell products or services. If the colors are unsuitable, the eye will reject the …

3. Five Checks for Web Pages
There are a few essential checks that you must make beforeuploading your pages.Check the basics - spelling, grammar, terminology. I've seena lot of arguments for and against using only US spelling onweb sites - I think this is a personal choice, but havingmade your decision, be consistent! Terminology - don't usewords or phrases that aren't common around the world. I reada software review recently - sadly, I didn't understand thephrase used to describe the program, so I don't know if thereviewer…

4. Are Webmasters Actually Ninjas? By Steve Hansen
1)Webmasters enjoy working at night when no one else is around and it is quiet. Ninjas work at night under the cover of darkness.2)Ninjas where tight fitting black clothing and black shoes. Webmasters wear tight fitting black T-shirts.3)Ninjas rely on cunning skill and black magic tricks to accomplish their mission. Webmasters often resort to black hat SEO tricks in order to get their pages ranked well in Google and Yahoo.4)Ninjas use smoke bombs to disappear. Webmasters are much more a…