Magic of htaccess file in Internet marketing


The .htaccess file and the power it has to improve your website. Although .htaccess is only a file, it can change settings on the servers and allow you to do many different things, the most popular being able to have your own custom 404 error pages. .htaccess isn't difficult to use and is really just made up of a few simple instructions in a text file. If your server runs Unix or Linux, or any version of the Apache web server it will support .htaccess, although your host may not allow you to use it.

There is a huge range of things .htaccess can do including:

password protecting folders, redirecting users automatically, custom error pages, changing your file extensions, banning users with certian IP addresses, only allowing users with certain IP addresses, stopping directory listings and using a different file as the index file.

Custom Error Pages

The first use of the .htaccess file which will cover is custom error pages. These will allow you to have your own, personal error pages (for example when a file is not found) instead of using your host's error pages or having no page.

This will make your site seem much more professional in the unlikely event of an error. It will also allow you to create scripts to notify you if there is an error (for example I use a PHP script on Free Webmaster Help to automatically e-mail me when a page is not found).

You can use custom error pages for any error as long as you know its number (like 404 for page not found) by adding the following to your .htaccess file: ErrorDocument errornumber /file.html If the file is not in the root directory of your site, you just need to put the path to it: ErrorDocument 500 /errorpages/500.html

These are some of the most common errors:

401 - Authorization Required

400 - Bad request

403 - Forbidden

500 - Internal Server Error

404 - Wrong page

Then, all you need to do is to create a file to display when the error happens and upload it and the .htaccess file.

Legal Disclaimer

Our website is not responsible for the information contained by this article. Articleinput.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.

Note: This article was sent to us by: Dotndot at 06142010

Related Articles

1. Steps to follow when building a Wordpress blog
Building a Blog Using WordPress.com Let’s imagine how someone might use a blog. Bill is a woodwork...

2. How to login and write your first post on Wordpress
Logging In to Your Blog When you have a blog on WordPress.com, you have a public side and a behind-the...

3. Setting Up Your Own Blog with WordPress Software
What if you’ve already tried the WordPress.com solution and been happy with it, but you want to expand the functions of your blog or en...

4. Which are the main limitations of the mobile web
The Mobile Web gives access to the Internet from anywhere, with devices that are small and lightweight. There’s no doubt about it: It&r...

5. How to perform a HTML test
HTML is an amazing language that has changed the online world. One of the great features of HTML is that, by and large, it works the same for...

6. How to promote your brand new website
Self-Promotion When you promote your website, you’re acting as your own advertising firm. No o...

7. How do search engines work and how to optimize your website for them
How Do Search Engines Work You probably use a search engine every time you’re on the Internet. A s...

8. How to maintain your website successfully
Maintaining Your Website A website is never finished. Think of it as a garden that needs constant atte...