.htaccess Guidance

.htaccess Guidance

The .htaccess file is a special Apache file that tells your website how to function. You can edit the existing .htaccess file on your site, or you can create a new text file in any directory and name it .htaccess.

How can I secure my .htaccess file?

The .htaccess file is already protected and forbidden to browsers. To be sure, double check that the file is named ".htaccess" and not "htaccess" or "htaccess.txt". The file must start with a dot.

Can I delete my .htaccess file permanently?

You can delete the .htaccess file, but it will reappear immediately as a blank file. HostMight has default directives which will always be in place, unless you create your own directives to overrule ours.

Example

Even if you erase and remove the .htaccess file, HostMight uses this code as a default.

DirectoryIndex index.html index.shtml index.php default.html home.html

You can override those defaults by creating your own rules.

DirectoryIndex home.html page1.php index.txt

Online Guides

If you do not code the .htaccess file correctly, it can cause website errors.

Guides to .htaccess coding:

Was this answer helpful? 6 Users Found This Useful (9 Votes)