willysec_id

.htaccess Secure CodeIgniter Upload Folder

Jun 23rd, 2025
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | Cybersecurity | 0 0
  1. <IfModule mod_rewrite.c>
  2. RewriteRule \.(ZIP|Zip|zip|tar|Tar|TAR|gz|Gz|GZ|bz2|Bz2|BZ2)$ - [F,L]
  3. </IfModule>
  4.  
  5. <Files ~ "\.(gif|jpeg|png|jpg|pdf|mp4|txt)$">
  6. Order allow,deny
  7. Allow from all
  8. </Files>
  9.  
  10. <FilesMatch "\.(?i:(js|py|sh|zip|jar|php[0-9]*|php|phtml|php3|php4|php5|phps|xml))$">
  11. Order allow,deny
  12. Deny from all
  13. </FilesMatch>
Advertisement
Add Comment
Please, Sign In to add comment