Categories
All About SEO promotions

.htaccess Tutorial

This tutorial will explain what it is .htaccess and how it functions to maximize your website that are in Afiahost.com .

Although .htaccess is a file, but .htaccess can change the settings on the server and allow you to do many different things, as an example is to use .htaccess you can create your own 404 pages.
.htaccess is not difficult to use because they only need to put some simple instructions in a text file is then saved by name .htaccess

What is the use .htaccess?

Perhaps you are wondering what can be done by .htaccess, or maybe you’ve read about it but did not realize that many things you can do with .htaccess.

Here are some of functions .htaccess

* Mem-protected Folders / Protect Folder with password
* Transferring your website visitors with an automatic
* Create pages error display your own message
* Reject the visitors with a specific IP Address
* Change your file extension
* Only allow certain visitors with IP Address
* Allow / Reject list directory

Create .htaccess files

.htaccess file is a text file that has no name but has a length of 8 letter extension.
An easy way to create this file by creating a file ending in. Txt and then when you are finished making, you just need to twist them .htaccess

If you have trouble changing the name of the file you can change it to htaccess.txt and then upload the file to your hosting account. After the file uploads you can change the name to use an FTP program you have or use the File Manager you can access through your cpanel.

Creating own error message page

By using .htaccess you can create an error message page that can be used for your own website and no longer uses the default settings from the server.
By using their own error message page can make your site look more professional in handling errors that occur even allow you to create scripts that can tell you if an error occurred.

You can use your own error message as long as you know the code used (such as 404 for the page can not be found / page not found) by adding the command below into the file .htaccess you:

ErrorDocument code / file.html

For example if you have a file in the root directory notfound.html from your site and want to use it for 404, you can use the line below:

ErrorDocument 404 / notfound.html

If the file is not in the root directory of your website, you just need to add a directory structure in, for example:

ErrorDocument 404 / error / notfound.html