Creating a new .htaccess file in Windows 7

August 23, 2009

Have you ever tried to create a new .htaccess file in Windows 7 (or Vista) via windows explorer? If so, this error will probably look familiar.

Rename-Error

Luckily there are a few easy ways around this annoying behavior.

Fix 1

Open Windows Explorer.

Right click > New > Text Document.

Enter ".htaccess." as your file name and say yes to the warning.

Fix 2

Open Notepad and hit go to File > Save As.

Change the save as type to "All Files".

Enter ".htaccess" as the file name and hit save.

Fix 3

Open a Command Prompt.

Type "copy con .htaccess" and press enter.

Press CTRL+Z then enter to save and exit your file.