J2TEAM Security: A must-have extension for Chrome users. Install now!

.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>
Leader at J2TEAM. Website: https://j2team.dev/

Đăng nhận xét

Cảm ơn bạn đã đọc bài viết!

- Bạn có gợi ý hoặc bình luận xin chia sẻ bên dưới.

- Hãy viết tiếng Việt có dấu nếu có thể!