# directory browsing
Options All -Indexes

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^tarkashcorp.appexperts\.net$|^www\.tarkashcorp.appexperts\.net$
RewriteRule ^(.*)$ https://www.tarkashcorp.appexperts.net/$1 [R,L]

#HTTP Strict Transport Security
Header set Strict-Transport-Security: "max-age=31536000 ; includeSubDomains ;" env=HTTPS
Header set Content-Security-Policy: upgrade-insecure-requests

# Enable Compression
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
</IfModule>
<IfModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
# End Enable Compression

# Leverage Browser 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 text/css "access 1 month"
  ExpiresByType text/html "access 1 month"
  ExpiresByType application/pdf "access 1 month"
  ExpiresByType text/x-javascript "access 1 month"
  ExpiresByType application/x-shockwave-flash "access 1 month"
  ExpiresByType image/x-icon "access 1 year"
  ExpiresDefault "access 1 month"
</IfModule>
<IfModule mod_headers.c>
  <filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf)$">
  Header set Cache-Control "max-age=2678400, public"
  </filesmatch>
  <filesmatch "\.(html|htm)$">
  Header set Cache-Control "max-age=7200, private, must-revalidate"
  </filesmatch>
  <filesmatch "\.(pdf)$">
  Header set Cache-Control "max-age=86400, public"
  </filesmatch>
  <filesmatch "\.(js)$">
  Header set Cache-Control "max-age=2678400, private"
  </filesmatch>
</IfModule>
# End Leverage Browser Caching

# BEGIN Compress text files
<ifModule mod_deflate.c>
  <filesMatch ".(css|js|x?html?|php)$">
    SetOutputFilter DEFLATE
  </filesMatch>
</ifModule>
# END Compress text files

# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
  <filesMatch ".(ico|jpe?g|png|gif|swf)$">
    Header set Cache-Control "max-age=2592000, public"
  </filesMatch>
  <filesMatch ".(css)$">
    Header set Cache-Control "max-age=604800, public"
  </filesMatch>
  <filesMatch ".(js)$">
    Header set Cache-Control "max-age=216000, private"
  </filesMatch>
  <filesMatch ".(x?html?|php)$">
    Header set Cache-Control "max-age=600, private, must-revalidate"
  </filesMatch>
</ifModule>
# END Cache-Control Headers

# BEGIN Turn ETags Off
<ifModule mod_headers.c>
  Header unset ETag
</ifModule>
FileETag None
# END Turn ETags Off

# BEGIN Remove Last-Modified Header
<ifModule mod_headers.c>
  Header unset Last-Modified
</ifModule>
# END Remove Last-Modified Header

RewriteCond %{HTTP_REFERER} !^http://appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btcampus.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btcampus.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btconnect.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btconnect.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btcover.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btcover.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btedge.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btedge.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://bthawk.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://bthawk.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btplus.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btplus.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btrise.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btrise.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btspot.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://btspot.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://deepijatel.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://deepijatel.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://ris.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://ris.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://tarkashcorp.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://tarkashcorp.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btcampus.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btcampus.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btconnect.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btconnect.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btcover.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btcover.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btedge.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btedge.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.bthawk.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.bthawk.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btplus.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btplus.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btrise.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btrise.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btspot.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.btspot.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.deepijatel.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.deepijatel.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ris.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ris.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.tarkashcorp.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.tarkashcorp.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btcampus.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btcampus.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btconnect.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btconnect.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btcover.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btcover.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btedge.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btedge.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://bthawk.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://bthawk.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btplus.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btplus.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btrise.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btrise.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btspot.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://btspot.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://deepijatel.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://deepijatel.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://ris.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://ris.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://tarkashcorp.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://tarkashcorp.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btcampus.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btcampus.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btconnect.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btconnect.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btcover.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btcover.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btedge.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btedge.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.bthawk.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.bthawk.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btplus.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btplus.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btrise.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btrise.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btspot.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.btspot.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.deepijatel.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.deepijatel.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.ris.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.ris.appexperts.net$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.tarkashcorp.appexperts.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.tarkashcorp.appexperts.net$      [NC]
RewriteRule .*\.(bmp)$ - [F,NC]
