How To Create And Use .htaccess Files For Apache Web Server in Microsoft Windows

Windows doesn’t support .htaccess files because of the naming convention. To Windows,.htaccess essentially is a nameless file, with a .htaccess file extension, similar in concept to having a file named .jpg. So you can see why file editors would complain if you try to save a file named .htaccess.

You can workaround this by 2 ways though:

Step 1: You can bring in the file, e.g. through FTP off a Linux box, and you can have it on your Windows computer and it wouldn’t complain. Apparently the complaints only come when you try to create a file named “.htaccess”.

Step 2: If you’re trying to run the Apache web server on Windows, then you’ll be glad to know that .htaccess is just a name, and the content inside your file is definitely still readable by Apache.

So even if .htaccess files can’t be created, you can reconfigure Apache by editing your Apache httpd.conf file so that maybe htaccess.txt are read by Apache instead of .htaccess. Just look for this line:

AccessFileName .htaccess

And change it to this line:

AccessFileName htaccess.txt

Voila. Problem solved.

Similar Posts:

Alvin Poh lives in Singapore, and is interested in marketing, techy stuff, and likes to just figure out how the two can work with each other. He can also be found on Google+.

Leave a reply:

Your email address will not be published.


Sliding Sidebar