Skip to content

Instantly share code, notes, and snippets.

Created November 13, 2016 16:42
Show Gist options
  • Save anonymous/8a6ee74a7ad8b065b4704c688e1425b7 to your computer and use it in GitHub Desktop.
Save anonymous/8a6ee74a7ad8b065b4704c688e1425b7 to your computer and use it in GitHub Desktop.
Закрытие директории загрузки от исполнения
Options -Indexes
<FilesMatch "\.(php|cgi|pl|php3|php4|php5|php6|php7|phps|phtml|shtml|py|php|php3|php4|php5|php6|phtml|pl|asp|aspx|cgi|dll|exe|ico|shtm|shtml|fcg|fcgi|fpl|asmx|pht|py|psp)$">
Order allow,deny
Deny from all
</FilesMatch>
<IfModule mod_mime.c>
RemoveHandler php .php3 .php4 .php5 .php6 .php7 .phtml .pl .asp .aspx .cgi .dll .exe .ico .shtm .shtml .fcg .fcgi .fpl .asmx .pht .py .psp
AddType text/plain php .php3 .php4 .php5 .php6 .php7 .phtml .pl .asp .aspx .cgi .dll .exe .ico .shtm .shtml .fcg .fcgi .fpl .asmx .pht .py .psp
</IfModule>
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment