Forum Moderators: coopster
/var/www/host/files/
/var/www/host/files/doc/file/ /var/www/host/files/doc/articles_file/ <FilesMatch "\.(P[Hh][Pp]|pH[Pp]|phP)$">
AddType application/octet-stream
</FilesMatch
The FilesMatch envelope is needed because AddType itself is case-insensitive, darn it, while Files(Match) is case-sensitive. (At least I hope so. I've always worked on the assumption that it is.) The term "octet-stream" simply means "I decline to state what kind of file this is, so you will jolly well be forced to download it". AddType application/octet-stream .php
in the relevant directory. it work very well but only on static folder
...
/var/www/host/files/doc/file/
/var/www/host/files/doc/articles_file/
<FilesMatch "\.(P[Hh][Pp]|pH[Pp]|phP)$">
looking only at the extension. If you've also got things like "PhP.jpg" to look out for (really? how does that work?) change the pattern to \b(P[Hh][Pp]|pH[Pp]|phP)\b