Getting .htaccess to work on windows apache

Could figure out how to actually write the .htaccess file in windows as when i tried to rename the txt file I created to .htaccess it popped up an error saying “You must type a file name”.

The solution:

1. Open up notepad

2. Write the contents of your .htaccess

3. Save as

4. “.htacess” – Make sure you keep the speech marks.

5. Sorted

Related posts:

  1. SSH Mysql command line
  2. How to edit php.ini from ssh
  3. Safari 3 for Windows XP – Finally

4 responses


Do you want to comment?

Comments RSS and TrackBack Identifier URI ?

Not sure about this as I am having general issues with getting htaccess working in windows. But you should know about the directive in httpd.conf of Apache

AccessFileName .htaccess

February 1, 2008 9:34 am

Go into the directive in httpd.conf of Apache

Look for:
AccessFileName .htaccess

change the filename to look for to something like:
ht.htaccess

Now apache looks for “ht.access” and windows is happy too.

Do this on a provate or testing server ONLY an when uploading simply rename the file to .htaccess

May 15, 2008 10:21 am

How do I get this to work on a hosted server running windows?

August 5, 2008 2:55 am

The most comprehensive info I have found on this subject on the net. Will be back soon to follow up….

April 16, 2010 4:54 pm

Comment now!
















Trackbacks