Your hosting can make or break your site. Choosing the right host will undoubtedly determine your fate. Here you\'ll learn how it\' done.  Home Site Maintenance Hosting Services Introduction to .htaccess
Your Ad Here

Introduction to .htaccess

Browse Pages: << < 1  2  3  4  5  > >>

Image from Hosting Services: Error Pages

The standard error pages can be very annoying. When you move a page in your site, visitors have no way of finding where you moved it to in the error page. With custom error pages you can get cool error pages that have the same layout as your site and get rid of the standard ones and replace them with one that will help redirect users to anypage you wish.

There are 5 kinds of errors that can occur, here is the list with the definition:
400 - Bad request 401 - Authorization Required 403 - Forbidden 404 - Wrong page 500 - Internal Server Error

First of all, you will need to create your errors pages. Put anything in them you would like, it doesn't matter. However I would suggest placing a link to your main page on it. Then upload your pages to your site in a sepertate folder and call it anything you'd like.

Now in your .htaccess file, (Please see the .htaccess tutorial to make one if you don't already have one.) copy the following as shown below. Don't wrap the text. You will need to change the folder name in the links to the one you used.

ErrorDocument 400 http://www.yourdomain.com/errordocs/400.html
ErrorDocument 401 http://www.yourdomain.com/errordocs/401.html
ErrorDocument 403 http://www.yourdomain.com/errordocs/403.html
ErrorDocument 404 http://www.yourdomain.com/errordocs/404.html
ErrorDocument 500 http://www.yourdomain.com/errordocs/500.html

Save your .htaccess file and upload it to your server in the main directory. Test it out to make sure it works.

Everything should work, if not, your server may not support this.



Author's URL: Depiction.net
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
Browse Pages: << < 1  2  3  4  5  > >>
print this page subscribe to newsletter subscribe to rss

Read about the most important web services: web promotion, domain registration and website hosting. All web developers need this website maintenance stuff. More Site Maintenance: Most Popular Materials | Fresh Materials | Website Templates

Add comments to "Introduction to .htaccess"

Only registered users can write comment

No comments yet...