fbpx

Stop hackers from executing scripts if they somehow manage to place them in the uploads directory.

Just put an .htaccess file in the uploads directory with the following contents:

# BEGIN code execution protection

php_flag engine 0


AddHandler cgi-script .php .phtml .php3 .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI
# END code execution protection

Or append it to an already-existing .htaccess, but be warned it may interfere with preexisting rules, so be sure you know what you’re doing.