Disable execution of PHP, Perl, Python, Java in .htaccess

RussianRoot 28/06/2013 0
Disable execution of PHP, Perl, Python, Java in .htaccess

Hello everyone!

Sometimes you need to disable execution of scripts under certain folder using .htaccess. It’s useful if you have any security issue on server and want to stop execution of dynamic languages or disable php in images folder under joomla.

Here is the code:

As we can see, we add cgi-script handler to “.php .pl .py .jsp .asp .htm .shtml .sh .cgi” on the first line and on the second we disable the execution of cgi-script as an Option of apache.

That worked for me, when my server had a PHP shell under /media/ folder, hope it’ll help you too!

Good luck!

Leave A Response »

6 + = 10

Warning: require_once(/www/htdocs/w00e1ca9/domainpool/russianroot.net): failed to open stream: No such file or directory in /www/htdocs/w00e1ca9/domainpool/russianroot.net/wp-content/themes/aven/footer.php on line 48

Fatal error: require_once(): Failed opening required '' (include_path='.:/usr/share/php:..') in /www/htdocs/w00e1ca9/domainpool/russianroot.net/wp-content/themes/aven/footer.php on line 48