# ATEC OPTIMIZE START
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{HTTPS} !=on
	RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

<FilesMatch "\.(css|js|csv|html|htm|txt|xml|svg|json|eot|php)$">
	<IfModule mod_deflate.c>
	  SetOutputFilter DEFLATE
	</IfModule>
</FilesMatch>

<IfModule mod_mime.c>
	AddType application/json .json
	AddType image/webp .webp
	AddType video/webm .webm
	AddType font/ttf .ttf
	AddType font/woff .woff
	AddType font/woff2 .woff2
</IfModule>

<IfModule mod_headers.c>
	Header set Connection keep-alive
	<filesmatch "\.(ico|ttf|woff|woff2|pdf|webm|mp[\d]+)$">
		# 4 month
		Header set Cache-Control "max-age=10368000, public"
	</filesmatch>
	<filesmatch "\.(gif|jpe?g|png|svg|webp)$">
		Header set Cache-Control "max-age=10368000, public"
	</filesmatch>
	<filesmatch "\.(css|js|xsl)$">
		# 30 days
		Header set Cache-Control "max-age=2592000, private"
	</filesmatch>
	<filesMatch "\.(x?html?|xml|txt|php)$">
		Header set Cache-Control "max-age=600, private, must-revalidate"
	  </filesMatch>
</IfModule>
# ATEC OPTIMIZE END

# BEGIN WordPress
<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
