I am using Mercurial for version control, and have an .htaccess file in my web root with rewrite rules that differ depending on whether it's my localhost or my development server, etc. Therefore, I have put ".htaccess" into my .hgignore file, so that it's not part of version control.
However, I also have another .htaccess file, at .hg/.htaccess, with "deny from all", so that my .hg folder is not web accessible. I DO want THIS htaccess file checked in to version control, so that there's no chance of me forgetting to set it up on a new server, etc.
Is there a way to do this? It seems as if just putting ".htaccess" into my hgignore makes it ignore all .htaccess files, located anywhere. I tried "./.htaccess", hoping that'd ignore the root level one, but not .hg/.htaccess--didn't work though. I've tried doing research and have not had much luck.
Thanks, and sorry if I missed something obvious somewhere!
It is not possible. Not because of ignore, but because of files from .hg
cannot be tracked by mercurial.
So you better create and check-in .htaccess.dist
with template that fits most of your requirements and after you check out it on a particular machine - copy .htaceccess.dist
to .htaccess
and make required changes in it.