Skip to main content

.htaccess security

Để vào các foder file .htacces phòng tránh up shell:

<Files ~ “^.*\.(php|cgi|pl|php3|php4|php5|php6|phtml|shtml) ”>
Order allow,deny
Deny from all
</Files>
Chống scan folder:
<IfModule mod_rewrite.c>

RewriteEngine on

# Rewrite URLs of the form 'index.php?r=x'.

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /index.php [L,QSA]

</IfModule>
<Files ~ ”\.(inc|sql|php|cgi|pl|asp|aspx|jsp|txt)$”>
order allow,deny
deny from all
</Files>

Share this with your friends
Loading...