Creating a .htaccess file on Windows

Everyone who has tried creating a .htaccess on windows knows that Windows Explorer does not accept the ‘.’ character as the first character of a file. For most of you this may be old stuff, but for the newbies, the quick way to create the file is to open the command prompt and type:

copy con .htaccess [press enter]
[press ctrl Z]

The second way is to:
Open notepad and save the document with file name .htaccess with the ‘save as type’ set to ‘All Files’; or save the document with file name as “.htaccess” including the quotes.

2 thoughts to “Creating a .htaccess file on Windows”

  1. Actually, you can use “edit” command to create a “.htaccess” file, just open windows command line program, “cmd”, then type “edit .htaccess”, edit the file and save it or if you have already an htaccess file just rename it, “rename htaccess.txt .htaccess”.

Leave a Reply

Your email address will not be published.