How to hide files in Apache 2.2 WebDAV Directory listings

apache-2.2webdav

I use Apache 2.2 as WebDAV file server to a bunch of Mac and MS Windows clients. Unfortunately both clutter the filesystem with files like .DS_Store or thumbs.db.

Since hte files distract my users i want to hide them from directory listings. Unfortunately the standard way of hiding files in Apache (via IndexIgnore) seems not to work via WebDAV.

Is there any other way to hide files?

Best Answer

Add this to your apache config file below the DocumentRoot directive.

<FilesMatch '^\.[Dd][Ss]_[Ss]'>
Order allow,deny
Deny from all
</FilesMatch>

<FilesMatch '\.[Dd][Bb]'>
Order allow,deny
Deny from all
</FilesMatch>
Related Topic