# MIME TYPES
<IfModule mod_mime.c>
	AddDefaultCharset utf-8
	DefaultLanguage en-Us
	AddType application/javascript js jsonp
	AddType application/json json
	AddType font/opentype otf
	AddType application/font-woff woff
	AddType application/font-woff2 woff2
	AddType application/x-font-woff woff
	AddType application/vnd.ms-fontobject eot
	AddType application/x-font-ttf ttc ttf
	AddType image/svg+xml svg svgz
	AddEncoding gzip svgz
	AddType image/webp webp
	AddType image/x-icon ico	
</IfModule>

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$">
<IfModule mod_headers.c>
Header set Expires "2050"
Header unset ETag
</IfModule>
FileETag None
</FilesMatch>

# compress text, HTML, JavaScript, CSS, and XML
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE image/svg+xml
</ifModule>

# remove browser bugs
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>
</IfModule>

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/webp "access 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType text/html "access 1 year"
ExpiresByType text/css "access 1 year"
ExpiresByType text/javascript "access 1 year"
ExpiresByType text/x-javascript "access 1 year"
ExpiresByType application/javascript "access 1 year"
ExpiresByType application/x-javascript "access 1 year"
ExpiresByType application/xhtml+xml "access 1 year"
ExpiresByType application/pdf "access 1 year"
ExpiresByType application/x-shockwave-flash "access 1 year"
# This part sets the expires for the fonts
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-opentype "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType application/x-font-woff2 "access plus 1 year"
ExpiresDefault "access 1 year"
</IfModule>


# Disable server signature
 ServerSignature Off
 

<IfModule mod_rewrite.c>
RewriteEngine On

# Force https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS

RewriteCond %{HTTP_HOST} ^www.airductcleaningmissionbend.com$ [NC]
RewriteRule ^(.*)$ https://airductcleaningmissionbend.com/$1 [R=301,L]

RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* â€“ [F,L]

RewriteRule ^post([^/]*)-([^/]*)\.html$ /post.php?id=$1&title=$2 [L]
RewriteRule ^blog_sitemap.xml$ blog.php?post=sitemap
RewriteRule ^blog$ blog.php
RewriteRule ^blog/$ blog.php
RewriteRule ^blog/(.*).html$ blog.php?id=$1
</IfModule>

ErrorDocument 404 /404.html



