|
5 Notices
|
KB Home >
Linux
>
.htaccess file
|
The .htaccess file The .htaccess file is a file to make configuration changes on a per directory basis. This file works well with Apache web server and on Linux. There are several things that developers, site owners and webmasters can do by using .htaccess file. Here is a few: * Prevent directory browsing * Redirect visitors from one page or directory to another * Change the default index page of a directory * Prevent hot-linking of images from your website * Prevent access to your .htaccess file The .htaccess file allows one to make changes on a per directory basis, therefore valid places for .htaccess file would be: /.htaccess [placing in root folder of the site] /content/.htaccess [placing in content folder] /content/html/images/.htaccess [in the images folder] However, if there is only one .htaccess file in the root, it will affect the entire site. =] Please make regular backups of your .htaccess file, as we will not be held accountable for any consequences that arise due to editing you .htaccess file. The file is hidden, so hidden files will need to be enabled(which should be by default), then you can edit it with your favourite editor. When saving, please save the file with double quotes, [Save file as “.htaccess”], this will save the file as .htaccess file. |
Mail |
Print| Additional Info |
![]() |