How can I disable PHP execution in a specific subdirectory?

#1
Hi guys

How can I disable PHP in a specific subdirectory? I've got a media uploads folder where I want to prevent PHP execution (for an added layer of security).

Thanks!
 

Cold-Egg

Administrator
#2
Can use rewrite rule to prevent it. Go to the uploads folder and add .htaccess with following rules,

Code:
RewriteEngine on
RewriteRule (.*)php$ - [F]
 
Top