RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Header set X-XSS-Protection "1; mode=block"

Header set X-Content-Type-Options nosniff

Header always append X-Frame-Options SAMEORIGIN

### BEGIN - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ###
<IfModule mod_rewrite.c>
RewriteEngine on

# RewriteBase is set to "/" so rules do not need updating if the
# installation directory is relocated.  It is imperative that
# there is also a RewriteCond rule later that can effectively get
# the actual value by comparison against the request URI.
# 
# If there are _any_ other RewriteBase directives in this file,
# the last entry will take precedence!
RewriteBase /

# Redirect directories to an address with slash
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$  $1/ [R]

# Send all remaining (routable paths) through index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Determine and use the actual base
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
RewriteRule ^.*$ %2index.php [QSA,L]
</IfModule>
### END - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ###

# deny bots access

SetEnvIfNoCase user-agent .*Indy Library.* stayout=1

SetEnvIfNoCase user-agent .*libwww-perl.* stayout=1

SetEnvIfNoCase user-agent .*Offline Navigator.* stayout=1

SetEnvIfNoCase user-agent .*Xaldon WebSpider.* stayout=1

SetEnvIfNoCase user-agent .*Wget.* stayout=1

SetEnvIfNoCase user-agent .*WebImages.* stayout=1

SetEnvIfNoCase user-agent .*WebCapture.* stayout=1

SetEnvIfNoCase user-agent .*LiteFinder.* stayout=1

SetEnvIfNoCase user-agent .*disco.* stayout=1

SetEnvIfNoCase user-agent .*SBIder.* stayout=1

SetEnvIfNoCase user-agent .*MJ12bot.* stayout=1

SetEnvIfNoCase user-agent .*Baiduspider.* stayout=1

 

Order Allow,deny

Allow from all

deny from env=stayout

<IfModule mod_headers.c>
Header always set X-FRAME-OPTIONS "DENY"
</IfModule>

<IfModule mod_headers.c>
Header always set X-XSS-Protection "1; mode=block"
</IfModule>

<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>

