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

ErrorDocument 400 /400.html
ErrorDocument 401 /401.html
ErrorDocument 402 /402.html
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
ErrorDocument 405 /405.html
ErrorDocument 405 /408.html
ErrorDocument 500 /500.html
ErrorDocument 505 /505.html

Options -Indexes

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

<IfModule mod_headers.c>
  Header always append X-Frame-Options SAMEORIGIN
</IfModule>

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

<IfModule mod_rewrite.c>
  RewriteEngine On 
  RewriteCond %{REQUEST_METHOD} ^TRACE 
  RewriteRule .* - [F]
</IfModule>

<IfModule mod_ip2location.c>
  RewriteEngine On 
  RewriteCond %{ENV:IP2LOCATION_COUNTRY_SHORT} ^IN$
  RewriteRule ^(.*)$ https://accessystem.co.in [L]
 </IfModule>
