I have a question i need to protect site from uploading and/or executing any scripts or files other than images only in a wordpress site.
But i have tried few variations with .htaccess file and no success.
The wordpress have wp-content/uploads folder where uploads are stored. And inside that it’s sorted based on year / month combination in folders. I used this example from wordpress site but it somehow locks entire folder and i can’t even see the images.
<Files ^(*.jpeg|*.jpg|*.png|*.gif)>
order deny,allow
deny from all
</Files>
So is there a working way on making it available to upload and sort images inside wp-content/upload folders and later on access them. I think the problem is that there are subfolders sinside uploads or i am wrong ?
So an htaccess solution won’t affect what they can upload but will recursively effect access for all subdirectories.
That should do it.