The following explains what htaccess is and typical examples of it's uses.
Many people today host multiple domains on one server. These are called Virtualhosts. This means that all the domains must use the same Web server software installed on that particular server, this presents a huge problem. What if two domains using the same server need different configurations? The solution to this is by using htaccess.
Apache, like any other software, has configuration files. We edit these "global" configuration files to serve as a default for all of the sites hosted on the servers. The .htaccess file (pronounced "h t access") acts as a "local" configuration file so that individual Websites can customise the configuration to suit their needs.
The .htaccess file is an ordinary text file that you can create using Notepad or any text editor and ftp it into your Web root directory. This file will contain the configuration statements (commands) to customize the Apache Web server software for your Website.
A .htaccess file is a very powerful tool. You can use it to set up password-protected directories, change the way Apache responds to certain events, etc. The flip side of that is that you can really mess things up or give unintended access to visitors if you're not careful.
You may want to try out your attempts with .htaccess during low-traffic times on your Website so that any problems can be corrected without affecting too many visitors.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.