#Options +SymLinksIfOwnerMatch -Indexes Require all denied Order Allow,Deny Allow from all Require all denied Require all granted DirectoryIndex index.php # #Header always set Content-Security-Policy "upgrade-insecure-requests;" # RewriteEngine On RewriteBase / # Redirect http to https #RewriteCond %{HTTPS} !=on #RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] #page cache RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} !.*=.* RewriteCond %{HTTP_COOKIE} !^.*(nocache|cart|user|admin).*$ RewriteCond %{QUERY_STRING} !^.*(/admin).*$ RewriteCond %{DOCUMENT_ROOT}/page-cache/%{HTTP_HOST}/$1/index.html -f RewriteRule ^(.*) /page-cache/%{HTTP_HOST}/$1/index.html [L] RewriteCond %{DOCUMENT_ROOT}/page-cache/%{HTTP_HOST}/$1 -f RewriteRule ^(.*) /page-cache/%{HTTP_HOST}/$1 [L] #end page cache RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] #static files expiration #ExpiresDefault A2592000 = 1 month in the future #Cache-Control "max-age=2592000" = 1 month Header unset ETag Header set Connection keep-alive Header set Cache-Control "max-age=2592000" Header set Cache-Control "max-age=2592000" Header set Cache-Control "max-age=2592000" Header set Cache-Control "max-age=2592000" Header set Access-Control-Allow-Origin "*" #FileETag None ExpiresActive On ExpiresDefault A2592000 ExpiresDefault A2592000 ExpiresDefault A2592000 ExpiresDefault A2592000 ExpiresDefault A2592000 #gzip to reduce response size SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding AddOutputFilterByType DEFLATE "application/atom+xml" \ "application/javascript" \ "application/json" \ "application/ld+json" \ "application/manifest+json" \ "application/rdf+xml" \ "application/rss+xml" \ "application/schema+json" \ "application/vnd.geo+json" \ "application/vnd.ms-fontobject" \ "application/x-font-ttf" \ "application/x-javascript" \ "application/x-web-app-manifest+json" \ "application/xhtml+xml" \ "application/xml" \ "font/eot" \ "font/opentype" \ "image/bmp" \ "image/svg+xml" \ "image/vnd.microsoft.icon" \ "image/x-icon" \ "text/cache-manifest" \ "text/css" \ "text/html" \ "text/javascript" \ "text/plain" \ "text/vcard" \ "text/vnd.rim.location.xloc" \ "text/vtt" \ "text/x-component" \ "text/x-cross-domain-policy" \ "text/xml" AddEncoding gzip svgz