Deny access to specific file types in specific directory
The FilesMatch directive works purely on filenames. It doesn’t look at the path portion at all. If you want to specify directives in the root .htaccess file to control a subdirectory, you can use mod_rewrite. Try this: RewriteRule ^uploads/.*\.(php|rb|py)$ – [F,L,NC] The above will block any filename ending in .php or .rb or .py in … Read more