Category: What is .htaccess?

Share this post...Tweet about this on TwitterShare on Google+0Share on Facebook0

.htaccess is a file that you create in a web accessible directory to override default Apache settings on that directory and all of the directories inside of it. [If you don’t want this, you need to create another .htaccess file in the subdirectory changing the setting you changed back to the default.] If the directory is writable by the web server you can create a .htaccess file from the File Manager.

The most common uses of .htaccess are to changed the DirectoryIndex and to enable apache’s mod_rewrite module to get user and search engine friendly url’s, but there are many other uses.

.htaccess uses the same code syntax as any other apache configuration files. To create a .htaccess file simply create a simple text file with the apache code syntax you want to use in it and save it as “.htaccess” (without quotation marks, note the period) in the directory you want the settings to be effective in. Most people do this in the root html directory of their site but it can also be used in subdirectories.

NOTE: When you create a .htaccess file in the root of your site it also effects your subdomains since they are physical sub directories of your main site.
Web Server
Nov 12, 2012, 8:49 pmBy: InterWorx
What is .htaccess?
5 votes, 3.00 avg. rating (58% score)
(0) Comments

Leave a Reply
Surround code blocks with <pre>code</pre>

Your email address will not be published.


Broken Link