You can not create a .htaccess file within Windows 7. Simply because Windows Explorer will show you an error saying “You must type a file name.” Just like below, we tried to create .htaccess file with Notepad :

And it showed the error:
So, we will do a trick. First create an text file and name it as htaccess.txt:
---

You can name it as anything and save as text file; in next step you can rename it.
Now, open Command Prompt; we will rename the file from command prompt. You have to type:
<span style="background-color: #e9eef3; border: 2px solid #CDD6DB; font-color: #000000 font-size; font-family: Arial,Tahoma,Verdana; text-shadow: #fff 1px 1px;">rename (Full location of the file without brackets) htaccess.txt .htaccess</span>

Press Enter. Done. You will get the .htaccess file:


I thought I’d let you know of a nice trick for extension-only filenames. If you add a trailing dot, windows will allow the filename, and afterward ignore the dot. I.e. create a new textfile, and rename it “.htaccess.”, and it gets stored as “.htaccess” without trouble.
If you choose to include it in your post, no need for tribute, I didn’t discover this myself. Also, an alternative way, and the way I usually did this was by setting the filename from the text editor.
Great!
Surely we’ll add to the post. Thank you very much.
Perfect,
Thanks for sharing, very usefull