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

Share on facebook
Facebook
Share on google
Google+
Share on twitter
Twitter
Share on linkedin
LinkedIn

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:

More to explorer

how i started being a minimalist

How I Started Being A Minimalist

Once, I thought that all that mattered in life were the things that you possessed. Things like your car, house, watch, clothes.

Leave a Reply

Your email address will not be published. Required fields are marked *