# INFORMATION
# For new versions of this Gist go to:
# https://gist.github.com/julianpoemp/bcf277cb56d2420cc53ec630a04a3566
# Version 1.3.0
#
# Contributors:
# - RaschidJFR [https://gist.github.com/RaschidJFR/f6d21a03b0692f5c7a6a23954003f00b]

# Notice:
# If you need redirection to https, uncomment the redirection part
# If you have issues with browser caching you can uncomment the BROWSER CACHING part

Header set Strict-Transport-Security "max-age=16070400; includeSubDomains"
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "SAMEORIGIN"

Header unset Host

Options -Indexes

<IfModule mod_rewrite.c>

	RewriteEngine On

 	# -- Redirection to https (optional):
	# Please notice: You have to set your base-href attribute correctly:
	# a) If your app is on the root of the domain, you can just use "/"
	# b) If not, you need to set "https://" instead of "http://" in your base-href attribute
	# If you need this, uncomment the next two commands
	
	RewriteCond %{HTTPS} !on
  	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d

	RewriteRule ^.*$ - [NC,L]
	RewriteRule ^(.*) index.html [NC,L]

</IfModule>
