# BEGIN AccelerateWP
# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset UTF-8
# Force UTF-8 for a number of file formats
<IfModule mod_mime.c>
AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
</IfModule>

# FileETag None is not enough for every server.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>

# Since we’re sending far-future expires, we don’t need ETags for static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None

<IfModule mod_alias.c>
<IfModule mod_headers.c>
# HTML and text files - no browser cache
<FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$">
Header set X-Powered-By "AccelerateWP/3.20.0.3-1.1-41"
Header unset Pragma
Header set Cache-Control "no-cache, no-store, must-revalidate"
</FilesMatch>

# CSS and JavaScript - 1 year
<FilesMatch "\.(css|js|htc)$">
Header unset Pragma
Header set Cache-Control "public, max-age=31536000"
</FilesMatch>

# Images - 4 months
<FilesMatch "\.(gif|png|jpe?g|ico|webp|avif|avifs|bmp|svg|svgz|tif|tiff|cur)$">
Header unset Pragma
Header set Cache-Control "public, max-age=10368000"
</FilesMatch>

# Video and Audio - 4 months
<FilesMatch "\.(mp4|m4v|webm|ogg|ogv|mp3|m4a|wav|wma|avi|mov|qt|flv|swf|asf|asx|wax|wmv|wmx|divx|mpe?g|ra|ram|mid|midi)$">
Header unset Pragma
Header set Cache-Control "public, max-age=10368000"
</FilesMatch>

# Fonts - 4 months
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2)$">
Header unset Pragma
Header set Cache-Control "public, max-age=10368000"
</FilesMatch>

# Documents and archives - 1 month
<FilesMatch "\.(pdf|doc|docx|xls|xlsx|xlt|xlw|xla|ppt|pptx|pot|pps|zip|gz|gzip|tar|rar|exe|mdb|mpp|odt|ods|odp|odf|odg|odc|odb|wri|class|json)$">
Header unset Pragma
Header set Cache-Control "public, max-age=2592000"
</FilesMatch>
</IfModule>
</IfModule>

<IfModule mod_mime.c>
	AddType image/avif                                  avif
    AddType image/avif-sequence                         avifs
</IfModule>
# Expires headers (for better cache control)
<IfModule mod_expires.c>
	ExpiresActive on
	ExpiresDefault                              "access plus 1 month"
	# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
	ExpiresByType text/cache-manifest           "access plus 0 seconds"
	# 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 4 months"
	ExpiresByType image/png                     "access plus 4 months"
	ExpiresByType image/jpeg                    "access plus 4 months"
	ExpiresByType image/webp                    "access plus 4 months"
	ExpiresByType video/ogg                     "access plus 4 months"
	ExpiresByType audio/ogg                     "access plus 4 months"
	ExpiresByType video/mp4                     "access plus 4 months"
	ExpiresByType video/webm                    "access plus 4 months"
	ExpiresByType image/avif                    "access plus 4 months"
	ExpiresByType image/avif-sequence           "access plus 4 months"
	# HTC files  (css3pie)
	ExpiresByType text/x-component              "access plus 1 month"
	# Webfonts
	ExpiresByType font/ttf                      "access plus 4 months"
	ExpiresByType font/otf                      "access plus 4 months"
	ExpiresByType font/woff                     "access plus 4 months"
	ExpiresByType font/woff2                    "access plus 4 months"
	ExpiresByType image/svg+xml                 "access plus 4 months"
	ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
	# CSS and JavaScript
	ExpiresByType text/css                      "access plus 1 year"
	ExpiresByType application/javascript        "access plus 1 year"
</IfModule>
# Gzip compression
<IfModule mod_deflate.c>
# Active compression
SetOutputFilter DEFLATE
# Force deflate for mangled headers
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
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
# Don’t compress images and other uncompressible content
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
</IfModule>
</IfModule>

# Compress all output labeled with one of the following MIME-types
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
		                          application/javascript \
		                          application/json \
		                          application/rss+xml \
		                          application/vnd.ms-fontobject \
		                          application/x-font-ttf \
		                          application/xhtml+xml \
		                          application/xml \
		                          font/opentype \
		                          image/svg+xml \
		                          image/x-icon \
		                          text/css \
		                          text/html \
		                          text/plain \
		                          text/x-component \
		                          text/xml
</IfModule>
<IfModule mod_headers.c>
Header append Vary: Accept-Encoding
</IfModule>
</IfModule>

<IfModule mod_mime.c>
AddType text/html .html_gzip
AddEncoding gzip .html_gzip
</IfModule>
<IfModule mod_setenvif.c>
SetEnvIfNoCase Request_URI \.html_gzip$ no-gzip
</IfModule>

<IfModule maxcache_module>
	MaxCache On
	MaxCacheOptions -SkipCacheOnMobile -TabletAsMobile
	MaxCacheQSAllowedParams lang s permalink_name lp-variation-id
	MaxCacheQSIgnoredParams utm_source utm_medium utm_campaign utm_expid utm_term utm_content utm_id utm_source_platform utm_creative_format utm_marketing_tactic mtm_source mtm_medium mtm_campaign mtm_keyword mtm_cid mtm_content pk_source pk_medium pk_campaign pk_keyword pk_cid pk_content fb_action_ids fb_action_types fb_source fbclid campaignid adgroupid adid gclid age-verified ao_noptimize usqp cn-reloaded _ga sscid gclsrc _gl mc_cid mc_eid _bta_tid _bta_c trk_contact trk_msg trk_module trk_sid gdfms gdftrk gdffi _ke _kx redirect_log_mongo_id redirect_mongo_id sb_referer_host mkwid pcrid ef_id s_kwcid msclkid dm_i epik pp gbraid wbraid ssp_iabi ssp_iaba gad vgo_ee gad_source gad_campaignid onlywprocket srsltid gadid fbadid
	MaxCacheExcludeURI "/(?:.+/)?feed(?:/(?:.+/?)?)?$|/(?:.+/)?embed/|/(?:wp-content|wp-includes)/|/(index.php/)?(.*)wp-json(/.*|$)"
	MaxCacheExcludeUA "^(facebookexternalhit|WhatsApp).*"
	MaxCacheExcludeCookie "(wordpress_logged_in_.+|wp-postpass_|wptouch_switch_toggle|comment_author_|comment_author_email_)"
	MaxCachePath /wp-content/cache/wp-rocket/{HTTP_HOST}{REQUEST_URI}{QS_SUFFIX}/index{MOBILE_SUFFIX}{SSL_SUFFIX}.html{GZIP_SUFFIX}
</IfModule>

# END AccelerateWP
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php84” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php84 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit