Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
htaccess rules for deny access to php files for both apache 2.2 and 2.4
givanzacedfba21f28
diff --git a/.htaccess b/.htaccessindex 8156d80..b6eeb2f 100755--- a/.htaccess+++ b/.htaccess@@ -1,12 +1,23 @@-<Files *.php>- Order Deny,Allow- Deny from all-</Files>+<IfModule !mod_authz_core.c>+ <Files *.php>+ Require all denied+ </Files>++ <Files index.php>+ Order Allow,Deny+ Allow from all+ </Files>+</IfModule>++<IfModule mod_authz_core.c>+ <FilesMatch "\.(?i:php)$">+ Require all denied+ </FilesMatch>-<Files index.php>- Order Allow,Deny- Allow from all-</Files>+ <Files index.php>+ Require all granted+ </Files>+</IfModule><IfModule dir_module>DirectoryIndex index.php@@ -28,8 +39,7 @@ RewriteBase /#page cacheRewriteCond %{REQUEST_METHOD} !=POSTRewriteCond %{QUERY_STRING} !.*=.*-RewriteCond %{HTTP_COOKIE} !^.*(nocache).*$-#RewriteCond %{QUERY_STRING} !^.*(nocache|admin).*$+RewriteCond %{HTTP_COOKIE} !^.*(nocache|cart|user|admin).*$RewriteCond %{QUERY_STRING} !^.*(/admin).*$RewriteCond %{DOCUMENT_ROOT}/public/page-cache/%{HTTP_HOST}/$1/index.html -fRewriteRule ^(.*) /public/page-cache/%{HTTP_HOST}/$1/index.html [L]@@ -72,7 +82,7 @@ RewriteRule ^ index.php [L]</FilesMatch></IfModule>-FileETag None+#FileETag None<IfModule mod_expires.c>ExpiresActive Ondiff --git a/public/.htaccess b/public/.htaccessindex eb05fd3..d95dd48 100755--- a/public/.htaccess+++ b/public/.htaccess@@ -1,14 +1,25 @@#Options +SymLinksIfOwnerMatch -Indexes-<Files *.php>- Order Deny,Allow- Deny from all-</Files>+<IfModule !mod_authz_core.c>+ <Files *.php>+ Require all denied+ </Files>++ <Files index.php>+ Order Allow,Deny+ Allow from all+ </Files>+</IfModule>++<IfModule mod_authz_core.c>+ <FilesMatch "\.(?i:php)$">+ Require all denied+ </FilesMatch>-<Files index.php>- Order Allow,Deny- Allow from all-</Files>+ <Files index.php>+ Require all granted+ </Files>+</IfModule><IfModule dir_module>DirectoryIndex index.php@@ -29,8 +40,7 @@ RewriteBase /#page cacheRewriteCond %{REQUEST_METHOD} !=POSTRewriteCond %{QUERY_STRING} !.*=.*-RewriteCond %{HTTP_COOKIE} !^.*(nocache).*$-#RewriteCond %{QUERY_STRING} !^.*(nocache|admin).*$+RewriteCond %{HTTP_COOKIE} !^.*(nocache|cart|user|admin).*$RewriteCond %{QUERY_STRING} !^.*(/admin).*$RewriteCond %{DOCUMENT_ROOT}/page-cache/%{HTTP_HOST}/$1/index.html -fRewriteRule ^(.*) /page-cache/%{HTTP_HOST}/$1/index.html [L]