I have a htdocs directory where I am serving a few Microsoft Word documents. When someone is editing a document, the name of the document changes to look like something like this: "~$my_document.doc" and also .tmp files are created that represent edits of the document until the document is closed.
So, I want Apache to not serve these files until the user is finished editing them. So, I want to hide files ending with .tmp extension at the same time that I am hiding files that start with "~$" .
So, can anyone help me enhance this Apache directive to accomplish this?
<Directory "C:/Apache2.2/htdocs">
<Files ~ "\.tmp$">
Order allow,deny
Deny from all
</Files>
.....
</Directory>
This is a regular expression trick that is beyond my ability right now.