I want to create a .htaccess
file manually and discovered it seems impossible through the windows UI. I get a you must type a filename.
message. There has to be a way to create files with . as a prefix in windows.
Can this be done manually?
I want to create a .htaccess
file manually and discovered it seems impossible through the windows UI. I get a you must type a filename.
message. There has to be a way to create files with . as a prefix in windows.
Can this be done manually?
You could also use Command Prompt with
move
:move x.extension .extension
As an addition, if have sublime text installed in your development computer you can drag the file to your opened sublime window, right click the filename -> rename and enter whatever name even without any extension. This worked for me.
You can do this in any program other than
Explorer
, e.g.Notepad
,cmd.exe
etc.You just can't do it in Explorer, and Raymond Chen has offered an explanation as to why not.
Go to command prompt, cd to the appropriate folder and type:
After confirmation dialog the file will be created and you will be editing it directly. If you just want to create an empty file, try
Just type .htaccess. as filename. Notice the dot at the end of htaccess. This will change in Windows to .htaccess without a dot at the end.
Even if you don't have any third party editor (Notepad++ etc.) then also you can create files with dot as prefix.
To create
.htaccess
file, first create htaccess.txt file withContext Menu > New Text Document
.Then press
Alt + D
(Windows 7) andCtrl + C
to copy the path from the Address bar of Windows Explorer.Then go to command line and type code as below to rename your file:
Now you have a blank
.htaccess
without opening it in any editor.Hope this helps you out.