Home > Tutorials > HTACCESS Tutorials > Creating a .htaccess file

Creating a .htaccess file

Before you can start using any htaccess commands and functions, it is important to know how to create a .htaccess file. Surprisingly this actually causes people lots of problems. Most Operating Systems, Windows in particular, will not accept the file name .htaccess when you go to try to save the document. This error seems to have been fixed in Windows XP SP2, however certain people still seem to come upon errors when saving in this format.

If you are encountering errors with saving your .htaccess file, go ahead and save your file as htaccess.txt. Then upload the file to your web server using your favorite FTP program. Once your file is on the server go ahead and rename the file to .htaccess.

If for any reason you encounter errors when trying to rename your file to .htaccess then your host may not support htaccess files. Many hosts support .htaccess but don’t actually publicize it and many other hosts have the capability but do not allow their users to have a .htaccess file. As a general rule, if your server runs Unix or Linux, or any version of the Apache web server it will support .htaccess, although your host may not allow you to use it. Your best choice here is to email or call your host and ask them directly if they support .htaccess files.

About Michael Boguslavskiy

Michael Boguslavskiy is a full-stack developer & online presence consultant based out of New York City. He's been offering freelance marketing & development services for over a decade. He currently manages Rapid Purple - and online webmaster resources center; and Media Explode - a full service marketing agency.

Check Also

How To Populate A DIV via an HTML SelectBox, PDO, and jQuery

Imagine you have a database full of information, and you want to let users browse ...

Like every other website, this site uses cookies to analyze our traffic. Cookies may also be utilized by our advertisers and partners. By using this website you agree to the use of said cookies. More Information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings, continuing to navigate past this message, or you click "Accept" below then you are consenting to the use of cookies on the Rapid Purple website.

Close