Could we help you? Please click the banners. We are young and desperately need the money
This setting alone won't protect you against beingt hacked but it's another step forward for securing your CMS. In case an attacker manages it to compromise your system and upload a script into the /uploads directory he won't be able to execute it and further infect your installation. You should make sure though that the protected directory (in this example it's /uploads) is the only one the web server has write permissions to.
We will simply create a .htaccess file within the directory of your choice (e.g. /uploads) and add the following content:
#disable script execution AddHandler cgi-script .php .pl .jsp .asp .sh .cgi Options -ExecCGI
The "AddHandler" command will tell the web server to interprete the given file extensions as CGI scripts (executable files). In the next line we tell the server that executing CGI scripts is prohibited. That's all 😉