I have a directory on server, from which I only want .JPG files to be served by apache - and apache should deny requests for php, php3, php5 etc files.
What should I write in .htaccess?
I have tried following, first two are giving 500 internal error, third one is not working at all!
<Directory full-path-to/USERS>
<FilesMatch "\.(php3?|phtml)$">
Order Deny,Allow
Deny from All
</FilesMatch>
<LocationMatch "/USERS/.*\.(php3?|phtml)$">
Order Deny,Allow
Deny from All
</LocationMatch>
php_flag engine off
Regards,