FIX_HTACCESS
This commit is contained in:
parent
8124874d51
commit
f314792076
@ -5,27 +5,6 @@ Options -Indexes
|
|||||||
# Rewrite engine
|
# Rewrite engine
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
## ADDED for - block any script execution inside folder of public
|
|
||||||
<If "%{REQUEST_URI} =~ m#/(logo|add_image_upload|e_card_imgs|claim_sample_forms|sample_import_excel|writable)/#">
|
|
||||||
Deny from all
|
|
||||||
# Disable PHP engine
|
|
||||||
<IfModule mod_php.c>
|
|
||||||
php_flag engine off
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
# Disable CGI and other executable handlers
|
|
||||||
Options -ExecCGI
|
|
||||||
AddHandler cgi-script .php .pl .py .jsp .asp .sh .cgi
|
|
||||||
|
|
||||||
# Block access to any script-like files entirely
|
|
||||||
<FilesMatch "\.(php|php5|php7|phtml|pl|py|cgi|ap|aspx|sh|rb)$">
|
|
||||||
ForceType text/plain
|
|
||||||
#Order allow,deny
|
|
||||||
Deny from all
|
|
||||||
</FilesMatch>
|
|
||||||
</If>
|
|
||||||
|
|
||||||
|
|
||||||
# Turning on the rewrite engine is necessary for the following rules and features.
|
# Turning on the rewrite engine is necessary for the following rules and features.
|
||||||
# FollowSymLinks must be enabled for this to work.
|
# FollowSymLinks must be enabled for this to work.
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
|
|||||||
25
public/assets/.htaccess
Normal file
25
public/assets/.htaccess
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# ===============================
|
||||||
|
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||||
|
# ===============================
|
||||||
|
|
||||||
|
# Disable CGI
|
||||||
|
Options -ExecCGI
|
||||||
|
|
||||||
|
# Disable PHP for mod_php / LiteSpeed
|
||||||
|
<IfModule mod_php.c>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule lsapi_module>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Block any script file access
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# Block double extensions
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
BIN
public/assets/1.pdf
Normal file
BIN
public/assets/1.pdf
Normal file
Binary file not shown.
4
public/assets/1.php
Normal file
4
public/assets/1.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
echo 'Hi';
|
||||||
|
?>
|
||||||
25
public/claim_sample_forms/.htaccess
Normal file
25
public/claim_sample_forms/.htaccess
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# ===============================
|
||||||
|
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||||
|
# ===============================
|
||||||
|
|
||||||
|
# Disable CGI
|
||||||
|
Options -ExecCGI
|
||||||
|
|
||||||
|
# Disable PHP for mod_php / LiteSpeed
|
||||||
|
<IfModule mod_php.c>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule lsapi_module>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Block any script file access
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# Block double extensions
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
25
public/e_card_imgs/.htaccess
Normal file
25
public/e_card_imgs/.htaccess
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# ===============================
|
||||||
|
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||||
|
# ===============================
|
||||||
|
|
||||||
|
# Disable CGI
|
||||||
|
Options -ExecCGI
|
||||||
|
|
||||||
|
# Disable PHP for mod_php / LiteSpeed
|
||||||
|
<IfModule mod_php.c>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule lsapi_module>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Block any script file access
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# Block double extensions
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
25
public/sample_excel/.htaccess
Normal file
25
public/sample_excel/.htaccess
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# ===============================
|
||||||
|
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||||
|
# ===============================
|
||||||
|
|
||||||
|
# Disable CGI
|
||||||
|
Options -ExecCGI
|
||||||
|
|
||||||
|
# Disable PHP for mod_php / LiteSpeed
|
||||||
|
<IfModule mod_php.c>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule lsapi_module>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Block any script file access
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# Block double extensions
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
BIN
public/sample_excel/1.pdf
Normal file
BIN
public/sample_excel/1.pdf
Normal file
Binary file not shown.
4
public/sample_excel/1.php
Normal file
4
public/sample_excel/1.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
echo 'Hi';
|
||||||
|
?>
|
||||||
25
public/sample_import_excel/.htaccess
Normal file
25
public/sample_import_excel/.htaccess
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# ===============================
|
||||||
|
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||||
|
# ===============================
|
||||||
|
|
||||||
|
# Disable CGI
|
||||||
|
Options -ExecCGI
|
||||||
|
|
||||||
|
# Disable PHP for mod_php / LiteSpeed
|
||||||
|
<IfModule mod_php.c>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule lsapi_module>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Block any script file access
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# Block double extensions
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
25
public/writable/.htaccess
Normal file
25
public/writable/.htaccess
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# ===============================
|
||||||
|
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||||
|
# ===============================
|
||||||
|
|
||||||
|
# Disable CGI
|
||||||
|
Options -ExecCGI
|
||||||
|
|
||||||
|
# Disable PHP for mod_php / LiteSpeed
|
||||||
|
<IfModule mod_php.c>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule lsapi_module>
|
||||||
|
php_flag engine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Block any script file access
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# Block double extensions
|
||||||
|
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
Loading…
Reference in New Issue
Block a user