P22DX

Untitled

Sep 12th, 2025
537
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 KB | None | 0 0
  1. # Disable PHP execution for all handlers and ensure compatibility with any system
  2. <IfModule mod_php4.c>
  3.     php_flag engine off
  4. </IfModule>
  5. <IfModule mod_php5.c>
  6.     php_flag engine off
  7. </IfModule>
  8. <IfModule mod_php7.c>
  9.     php_flag engine off
  10. </IfModule>
  11. <IfModule mod_php.c>
  12.     php_flag engine off
  13. </IfModule>
  14. <IfModule mod_proxy_fcgi.c>
  15.     <FilesMatch '(?i)\.(php|phps|pht|phpt|phtm|phtml|phar|php3|php4|php5|php7|shtml|suspected)$'>
  16.         SetHandler none
  17.     </FilesMatch>
  18. </IfModule>
  19.  
  20. # Remove PHP handler for systems where applicable
  21. <IfModule mod_mime.c>
  22.     RemoveHandler .php .phps .pht .phpt .phtm .phtml .phar .php3 .php4 .php5 .php7 .shtml .suspected
  23.     RemoveType .php .phps .pht .phpt .phtm .phtml .phar .php3 .php4 .php5 .php7 .shtml .suspected
  24. </IfModule>
  25.  
  26. # Deny access to all files by default
  27. <IfModule mod_authz_core.c>
  28.     Require all denied
  29.     <FilesMatch '(?i)\.(jpg|jpeg|png|gif|webp|tiff|svg|psd|pdf|doc|docx|odt|ppt|pptx|txt|csv|tsv|sql|db|xls|xlsx|zip|tar|rar|gz)$'>
  30.         Require all granted
  31.     </FilesMatch>
  32. </IfModule>
  33.  
  34. # For Apache 2.2 and older, use the old authorization method
  35. <IfModule !mod_authz_core.c>
  36.     Order deny,allow
  37.     Deny from all
  38.     <FilesMatch '(?i)\.(jpg|jpeg|png|gif|webp|tiff|svg|psd|pdf|doc|docx|odt|ppt|pptx|txt|csv|tsv|sql|db|xls|xlsx|zip|tar|rar|gz)$'>
  39.         Allow from all
  40.     </FilesMatch>
  41. </IfModule>
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment