Windows apparently complains with an error message similar to the following when you attempt to create or rename a file to a name starting with a dot. Such as .htaccess.
You must type a filename !
What alot of people aren't aware of is that Apache actually has a setting you can alter to change the name of the file used for .htaccess.
The name of that setting is
Now at first glance it would seem that altering the
AccessFileNamedirective could cause major problems, and it can. You probably shouldn't alter this setting on anything other than a system in an intranet enviroment. You should also be prepared to rename existing .htaccess files when doing this.
That said, here's an example of what can be done with the
AccessFileNamedirective. Note that this needs to be done in the Server Config or a Virtual Host container.
<Files ~ "^(ht)?\.ht">
Deny from all
AccessFileName ht.htaccessshould be pretty self explainitory. It makes the filename used ht.htaccess instead of just .htaccess
This way it's simple to create an ht.htaccess file on the Windows machine, then simply rename it to .htaccess once it gets uploaded to the server.
The second part of that example code isn't required, but it's done just in case you ever have other people with access to the machine. There's a similar section in your actual Apache configuration file already. That section doesn't include the
(ht)?part that prevents the new ht.htaccess from being viewed as currently happens with the default .htaccess files.
It also will not conflict with anything if you later decide to revert to the default setting for
AccessFileName& forget to remove it.
The Apache Manuals' htaccess page goes into much more detail about htaccess files.