Wednesday, January 25, 2012

disable PHP script execution in upload attachment directory

disable PHP script execution in upload attachment directory

// Apache
<Directory /website/attachments>
  php_flag engine off 
</Directory>
// Nginx
location /sites/default/files/ { 
  location ~ .*\.(php)?$
  { 
    deny all; 
  }
}

No comments: