<ifModule mod_headers.c>
    <FilesMatch "\.(html|htm)$">
        Header set Cache-Control "max-age=43200"
    </FilesMatch>

    <FilesMatch "\.(js|css|txt)$">
        Header set Cache-Control "max-age=604800"
    </FilesMatch>

    <FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png|svg)$">
        Header set Cache-Control "max-age=2592000"
    </FilesMatch>

    <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
        Header unset Cache-Control
    </FilesMatch>
</IfModule>

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/css
  <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
  </IfModule>
</IfModule>

SetEnvIfNoCase User-Agent .*BLEXBot.* bad_bot
SetEnvIfNoCase User-Agent .*BlackWidow.* bad_bot
SetEnvIfNoCase User-Agent .*Nutch.* bad_bot
SetEnvIfNoCase User-Agent .*Jetbot.* bad_bot
SetEnvIfNoCase User-Agent .*WebVac.* bad_bot
SetEnvIfNoCase User-Agent .*Stanford.* bad_bot
SetEnvIfNoCase User-Agent .*scooter.* bad_bot
SetEnvIfNoCase User-Agent .*naver.* bad_bot
SetEnvIfNoCase User-Agent .*dumbot.* bad_bot
SetEnvIfNoCase User-Agent .*grub.* bad_bot
SetEnvIfNoCase User-Agent .*looksmart.* bad_bot
SetEnvIfNoCase User-Agent .*WebZip.* bad_bot
SetEnvIfNoCase User-Agent .*larbin.* bad_bot
SetEnvIfNoCase User-Agent .*Copernic.* bad_bot
SetEnvIfNoCase User-Agent .*psbot.* bad_bot
SetEnvIfNoCase User-Agent .*Python-urllib.* bad_bot
SetEnvIfNoCase User-Agent .*NetMechanic.* bad_bot
SetEnvIfNoCase User-Agent .*URL_Spider_Pro.* bad_bot
SetEnvIfNoCase User-Agent .*CherryPicker.* bad_bot
SetEnvIfNoCase User-Agent .*EmailCollector.* bad_bot
SetEnvIfNoCase User-Agent .*EmailSiphon.* bad_bot
SetEnvIfNoCase User-Agent .*WebBandit.* bad_bot
SetEnvIfNoCase User-Agent .*EmailWolf.* bad_bot
SetEnvIfNoCase User-Agent .*Email.* bad_bot
SetEnvIfNoCase User-Agent .*ExtractorPro.* bad_bot
SetEnvIfNoCase User-Agent .*CopyRightCheck.* bad_bot
SetEnvIfNoCase User-Agent .*Crescent.* bad_bot
SetEnvIfNoCase User-Agent .*SiteSnagger.* bad_bot
SetEnvIfNoCase User-Agent .*ProWebWalker.* bad_bot
SetEnvIfNoCase User-Agent .*CheeseBot.* bad_bot
SetEnvIfNoCase User-Agent .*LNSpiderguy.* bad_bot
SetEnvIfNoCase User-Agent .*ia_archiver.* bad_bot
SetEnvIfNoCase User-Agent .*Alexibot.* bad_bot
SetEnvIfNoCase User-Agent .*Teleport.* bad_bot
SetEnvIfNoCase User-Agent .*MIIxpc.* bad_bot
SetEnvIfNoCase User-Agent .*Telesoft.* bad_bot
SetEnvIfNoCase User-Agent .*moget.* bad_bot
SetEnvIfNoCase User-Agent .*WebStripper.* bad_bot
SetEnvIfNoCase User-Agent .*WebSauger.* bad_bot
SetEnvIfNoCase User-Agent .*WebCopier.* bad_bot
SetEnvIfNoCase User-Agent .*NetAnts.* bad_bot
SetEnvIfNoCase User-Agent .*WebAuto.* bad_bot
SetEnvIfNoCase User-Agent .*TheNomad.* bad_bot
SetEnvIfNoCase User-Agent .*WWW-Collector-E.* bad_bot
SetEnvIfNoCase User-Agent .*RMA.* bad_bot
SetEnvIfNoCase User-Agent .*asterias.* bad_bot
SetEnvIfNoCase User-Agent .*httplib.* bad_bot
SetEnvIfNoCase User-Agent .*turingos.* bad_bot
SetEnvIfNoCase User-Agent .*spanner.* bad_bot
SetEnvIfNoCase User-Agent .*Harvest.* bad_bot
SetEnvIfNoCase User-Agent .*InfoNaviRobot.* bad_bot
SetEnvIfNoCase User-Agent .*Bullseye.* bad_bot
SetEnvIfNoCase User-Agent .*WebBandit.* bad_bot
SetEnvIfNoCase User-Agent .*NICErsPRO.* bad_bot
SetEnvIfNoCase User-Agent .*DittoSpyder.* bad_bot
SetEnvIfNoCase User-Agent .*Foobot.* bad_bot
SetEnvIfNoCase User-Agent .*WebmasterWorldForumBot.* bad_bot
SetEnvIfNoCase User-Agent .*SpankBot.* bad_bot
SetEnvIfNoCase User-Agent .*BotALot.* bad_bot
SetEnvIfNoCase User-Agent .*lwp-trivial.* bad_bot
SetEnvIfNoCase User-Agent .*WebmasterWorld.* bad_bot
SetEnvIfNoCase User-Agent .*BunnySlippers.* bad_bot
SetEnvIfNoCase User-Agent .*Wget.* bad_bot
SetEnvIfNoCase User-Agent .*LinkWalker.* bad_bot
SetEnvIfNoCase User-Agent .*cosmos.* bad_bot
SetEnvIfNoCase User-Agent .*hloader.* bad_bot
SetEnvIfNoCase User-Agent .*humanlinks.* bad_bot
SetEnvIfNoCase User-Agent .*LinkextractorPro.* bad_bot
SetEnvIfNoCase User-Agent .*LexiBot.* bad_bot
SetEnvIfNoCase User-Agent .*True_Robot.* bad_bot
SetEnvIfNoCase User-Agent .*BlowFish.* bad_bot
SetEnvIfNoCase User-Agent .*SearchEngineWorld.* bad_bot
SetEnvIfNoCase User-Agent .*JennyBot.* bad_bot
SetEnvIfNoCase User-Agent .*MIIxpc.* bad_bot
SetEnvIfNoCase User-Agent .*BuiltBotTough.* bad_bot
SetEnvIfNoCase User-Agent .*ProPowerBot.* bad_bot
SetEnvIfNoCase User-Agent .*BackDoorBot.* bad_bot
SetEnvIfNoCase User-Agent .*WebEnhancer.* bad_bot
SetEnvIfNoCase User-Agent .*suzuran.* bad_bot
SetEnvIfNoCase User-Agent .*WebViewer.* bad_bot
SetEnvIfNoCase User-Agent .*VCI.* bad_bot
SetEnvIfNoCase User-Agent .*Szukacz.* bad_bot
SetEnvIfNoCase User-Agent .*QueryN.* bad_bot
SetEnvIfNoCase User-Agent .*Openfind.* bad_bot
SetEnvIfNoCase User-Agent .*Openbot.* bad_bot
SetEnvIfNoCase User-Agent .*Webster.* bad_bot
SetEnvIfNoCase User-Agent .*EroCrawler.* bad_bot
SetEnvIfNoCase User-Agent .*LinkScan.* bad_bot
SetEnvIfNoCase User-Agent .*Keyword.* bad_bot
SetEnvIfNoCase User-Agent .*Kenjin.* bad_bot
SetEnvIfNoCase User-Agent .*Iron33.* bad_bot
SetEnvIfNoCase User-Agent .*GetRight.* bad_bot
SetEnvIfNoCase User-Agent .*Gaisbot.* bad_bot
SetEnvIfNoCase User-Agent .*Aqua_Products.* bad_bot
SetEnvIfNoCase User-Agent .*MSIECrawler.* bad_bot
SetEnvIfNoCase User-Agent .*PerMan.* bad_bot
SetEnvIfNoCase User-Agent .*searchpreview.* bad_bot
SetEnvIfNoCase User-Agent .*sootle.* bad_bot
SetEnvIfNoCase User-Agent .*Enterprise_Search.* bad_bot
SetEnvIfNoCase User-Agent .*ChinaClaw.* bad_bot
SetEnvIfNoCase User-Agent .*Custo.* bad_bot
SetEnvIfNoCase User-Agent .*DISCo.* bad_bot
SetEnvIfNoCase User-Agent .*eCatch.* bad_bot
SetEnvIfNoCase User-Agent .*EirGrabber.* bad_bot
SetEnvIfNoCase User-Agent .*EmailSiphon.* bad_bot
SetEnvIfNoCase User-Agent .*EmailWolf.* bad_bot
SetEnvIfNoCase User-Agent .*ExtractorPro.* bad_bot
SetEnvIfNoCase User-Agent .*EyeNetIE.* bad_bot
SetEnvIfNoCase User-Agent .*FlashGet.* bad_bot
SetEnvIfNoCase User-Agent .*GetRight.* bad_bot
SetEnvIfNoCase User-Agent .*GetWeb!.* bad_bot
SetEnvIfNoCase User-Agent .*Go!Zilla.* bad_bot
SetEnvIfNoCase User-Agent .*Go-Ahead-Got-It.* bad_bot
SetEnvIfNoCase User-Agent .*GrabNet.* bad_bot
SetEnvIfNoCase User-Agent .*Grafula.* bad_bot
SetEnvIfNoCase User-Agent .*HMView.* bad_bot
SetEnvIfNoCase User-Agent .*HTTrack.* bad_bot
SetEnvIfNoCase User-Agent .*InterGET.* bad_bot
SetEnvIfNoCase User-Agent .*JetCar.* bad_bot
SetEnvIfNoCase User-Agent .*larbin.* bad_bot
SetEnvIfNoCase User-Agent .*LeechFTP.* bad_bot
SetEnvIfNoCase User-Agent .*Navroad.* bad_bot
SetEnvIfNoCase User-Agent .*NearSite.* bad_bot
SetEnvIfNoCase User-Agent .*NetAnts.* bad_bot
SetEnvIfNoCase User-Agent .*NetSpider.* bad_bot
SetEnvIfNoCase User-Agent .*NetZIP.* bad_bot
SetEnvIfNoCase User-Agent .*Octopus.* bad_bot
SetEnvIfNoCase User-Agent .*PageGrabber.* bad_bot
SetEnvIfNoCase User-Agent .*pavuk.* bad_bot
SetEnvIfNoCase User-Agent .*pcBrowser.* bad_bot
SetEnvIfNoCase User-Agent .*RealDownload.* bad_bot
SetEnvIfNoCase User-Agent .*ReGet.* bad_bot
SetEnvIfNoCase User-Agent .*SiteSnagger.* bad_bot
SetEnvIfNoCase User-Agent .*SmartDownload.* bad_bot
SetEnvIfNoCase User-Agent .*SuperBot.* bad_bot
SetEnvIfNoCase User-Agent .*SuperHTTP.* bad_bot
SetEnvIfNoCase User-Agent .*Surfbot.* bad_bot
SetEnvIfNoCase User-Agent .*tAkeOut.* bad_bot
SetEnvIfNoCase User-Agent .*VoidEYE.* bad_bot
SetEnvIfNoCase User-Agent .*WebAuto.* bad_bot
SetEnvIfNoCase User-Agent .*WebCopier.* bad_bot
SetEnvIfNoCase User-Agent .*WebFetch.* bad_bot
SetEnvIfNoCase User-Agent .*WebLeacher.* bad_bot
SetEnvIfNoCase User-Agent .*WebReaper.* bad_bot
SetEnvIfNoCase User-Agent .*WebSauger.* bad_bot
SetEnvIfNoCase User-Agent .*WebStripper.* bad_bot
SetEnvIfNoCase User-Agent .*WebWhacker.* bad_bot
SetEnvIfNoCase User-Agent .*WebZIP.* bad_bot
SetEnvIfNoCase User-Agent .*Wget.* bad_bot
SetEnvIfNoCase User-Agent .*Widow.* bad_bot
SetEnvIfNoCase User-Agent .*WWWOFFLE.* bad_bot
SetEnvIfNoCase User-Agent .*Zeus.* bad_bot
SetEnvIfNoCase User-Agent .*Semrush.* bad_bot
SetEnvIfNoCase User-Agent .*BecomeBot.* bad_bot
SetEnvIfNoCase User-Agent .*AhrefsBot.* bad_bot
SetEnvIfNoCase User-Agent .*MJ12bot.* bad_bot
SetEnvIfNoCase User-Agent .*rogerbot.* bad_bot
SetEnvIfNoCase User-Agent .*exabot.* bad_bot
SetEnvIfNoCase User-Agent .*Xenu.* bad_bot
SetEnvIfNoCase User-Agent .*dotbot.* bad_bot
SetEnvIfNoCase User-Agent .*gigabot.* bad_bot
SetEnvIfNoCase User-Agent .*BlekkoBot.* bad_bot
SetEnvIfNoCase User-Agent .*megaindex.* bad_bot
SetEnvIfNoCase User-Agent .*dsearch.* bad_bot
SetEnvIfNoCase User-Agent .*majestic-seo.* bad_bot
SetEnvIfNoCase User-Agent .*majestic-12.* bad_bot
SetEnvIfNoCase User-Agent .*ezooms.* bad_bot
SetEnvIfNoCase User-Agent .*scoutjet.* bad_bot
SetEnvIfNoCase User-Agent .*linkdexbot.* bad_bot
SetEnvIfNoCase User-Agent .*spbot.* bad_bot
SetEnvIfNoCase User-Agent .*aboundexbot.* bad_bot
SetEnvIfNoCase User-Agent .*backlinkcrawler.* bad_bot
SetEnvIfNoCase User-Agent .*archive.org_bot.* bad_bot
SetEnvIfNoCase User-Agent .*meanpathbot.* bad_bot
SetEnvIfNoCase User-Agent .*pagesinventory.* bad_bot
SetEnvIfNoCase User-Agent .*searchmetricsbot.* bad_bot
SetEnvIfNoCase User-Agent .*seokicks-robot.* bad_bot
SetEnvIfNoCase User-Agent .*sistrix.* bad_bot
SetEnvIfNoCase User-Agent .*lipperhey spider.* bad_bot
SetEnvIfNoCase User-Agent .*ncbot.* bad_bot
SetEnvIfNoCase User-Agent .*sitebot.* bad_bot
SetEnvIfNoCase User-Agent .*semrushbot.* bad_bot
<Limit GET POST HEAD>
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</Limit>

# Protect xmlrpc.php file
<Files xmlrpc.php>
     Order Deny,Allow
     Deny from all
     Allow from 8.8.8.8
</Files>

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress