## BEGIN EXPIRES CACHING - JCH OPTIMIZE ##
ExpiresActive on
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Feed
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# Media: images, video, audio
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType audio/ogg "access plus 1 year"
ExpiresByType video/ogg "access plus 1 year"
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/webm "access plus 1 year"
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 year"
# Webfonts
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType font/* "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-truetype "access plus 1 year"
ExpiresByType application/x-font-opentype "access plus 1 year"
ExpiresByType application/font-ttf "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/font-woff2 "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/font-sfnt "access plus 1 year"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
Header append Cache-Control "no-cache, no-store, must-revalidate"
Header edit Cache-Control "no-cache,.*no-store,.*must-revalidate" "public"
Header merge Cache-Control "public"
Header append Vary: Accept-Encoding
#Some server not properly recognizing WEBPs
Header set Content-Type "image/webp"
ExpiresDefault "access plus 1 year"
AddOutputFilterByType BROTLI_COMPRESS text/html text/xml text/plain
AddOutputFilterByType BROTLI_COMPRESS application/rss+xml application/xml application/xhtml+xml
AddOutputFilterByType BROTLI_COMPRESS text/css
AddOutputFilterByType BROTLI_COMPRESS text/javascript application/javascript application/x-javascript
AddOutputFilterByType BROTLI_COMPRESS image/x-icon image/svg+xml
AddOutputFilterByType BROTLI_COMPRESS application/rss+xml
AddOutputFilterByType BROTLI_COMPRESS application/font application/font-truetype application/font-ttf
AddOutputFilterByType BROTLI_COMPRESS application/font-otf application/font-opentype
AddOutputFilterByType BROTLI_COMPRESS application/font-woff application/font-woff2
AddOutputFilterByType BROTLI_COMPRESS application/vnd.ms-fontobject
AddOutputFilterByType BROTLI_COMPRESS font/ttf font/otf font/opentype font/woff font/woff2
AddOutputFilterByType DEFLATE text/html text/xml text/plain
AddOutputFilterByType DEFLATE application/rss+xml application/xml application/xhtml+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE image/x-icon image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/font application/font-truetype application/font-ttf
AddOutputFilterByType DEFLATE application/font-otf application/font-opentype
AddOutputFilterByType DEFLATE application/font-woff application/font-woff2
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf font/otf font/opentype font/woff font/woff2
# Don't compress files with extension .gz or .br
RewriteRule "\.(gz|br)$" "-" [E=no-gzip:1,E=no-brotli:1]
SetEnvIfNoCase Request_URI \.(gz|br)$ no-gzip no-brotli
## END EXPIRES CACHING - JCH OPTIMIZE ##
## BEGIN CAPTURE CACHE - JCH OPTIMIZE ##
Header set X-Cached-By: "JCH Optimize v7.3.1.3"
RewriteEngine On
RewriteRule "\.html\.gz$" "-" [T=text/html,E=no-gzip:1,E=no-brotli:1,L]
Header append Content-Encoding gzip
Header append Vary Accept-Encoding
RewriteRule .* - [E=JCH_GZIP_ENABLED:yes]
AddEncoding gzip .gz
RewriteRule .* - [E=JCH_GZIP_ENABLED:yes]
RewriteCond %{ENV:JCH_GZIP_ENABLED} ^yes$
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* - [E=JCH_GZIP:.gz]
RewriteRule .* - [E=JCH_SCHEME:http]
RewriteCond %{HTTPS} on [OR]
RewriteCond %{SERVER_PORT} ^443$
RewriteRule .* - [E=JCH_SCHEME:https]
RewriteCond %{REQUEST_METHOD} ^GET
RewriteCond %{HTTP_COOKIE} !jch_optimize_no_cache
RewriteCond "/homepages/7/d398759287/htdocs/16dec2018/media/com_jchoptimize/cache/html/%{ENV:JCH_SCHEME}/%{HTTP_HOST}%{REQUEST_URI}/%{QUERY_STRING}/index\.html%{ENV:JCH_GZIP}" -f
RewriteRule .* "/media/com_jchoptimize/cache/html/%{ENV:JCH_SCHEME}/%{HTTP_HOST}%{REQUEST_URI}/%{QUERY_STRING}/index.html%{ENV:JCH_GZIP}" [L]
## END CAPTURE CACHE - JCH OPTIMIZE ##