| |||
| |||
|
|
|
Home:
Support:
Manual:
.htaccess:
.htaccess The ".htaccess" file can be placed in one or many of the directories in of server. This file "controls" the access to the pages in a directory. When your server goes to hand out a file, it starts checking in the top directory for a .htaccess file, and then checks each subdirectory down to and including the directory that your file is in. Thus you can set the defaults for your server by placing a .htaccess file in the top directory of your server, or your home directory. For example, you can see in your Control Panel exactly how to setup customized Error Pages. This is nothing more than creating a .htaccess file to handle server errors such as the "404 File Not Found" message. You may set this up manually using a .htaccess file Redirect all 404 not found and other errors to a page of your choosing
404 errors are generated when users try to go to a page that doesn't exist, like a typo in the url. By default, these errors cause a plain, ugly page to be shown to the user. To redirect a 404 or other error, add the .htaccess code below, substituting the url of the page you want the user to be redirected to.Ban certain IPs from accessing your site, or only allow certain IPs
Allow only certain users from certain ISPs to access:Redirection
The Redirect Directive is a nice simple way to push a browser over to a different page if you've re-organized your web-site. If you moved a page in somedir from page1.htm to page2.htm then the appropriate line to add to your .htaccess file would be:There are a great many things you can do with .htaccess. Typically, most of the things you would need .htaccess for are implemented into the Control Panel, such as password protecting directories, assigning users, etc.. For more extensive .htaccess information, use the NCSA authentication tutorial.
|