RewriteEngine on
Options +SymLinksIfOwnerMatch
RewriteCond %{HTTP_HOST} !^www.room32wll.com$ [NC]
RewriteRule ^(.*)$ http://www.room32wll.com/$1 [L,R=301]
ErrorDocument 400 http://www.room32wll.com
ErrorDocument 401 http://www.room32wll.com
ErrorDocument 404 http://www.room32wll.com
ErrorDocument 403 http://www.room32wll.com
ErrorDocument 500 http://www.room32wll.com
ServerSignature Off

RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http%3A%2F%2F [OR]
# Prevent use of specified methods in HTTP Request 
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC,OR] 
# Block out use of illegal or unsafe characters in the HTTP Request 
RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* [NC,OR] 
# Block out use of illegal or unsafe characters in the Referer Variable of the HTTP Request 
RewriteCond %{HTTP_REFERER} ^(.*)(<|>|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR] 
# Block out use of illegal or unsafe characters in any cookie associated with the HTTP Request 
RewriteCond %{HTTP_COOKIE} ^.*(<|>|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR] 
# Block out use of illegal characters in URI or use of malformed URI 
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999}.* [NC,OR] 
# Block out  use of empty User Agent Strings
# NOTE - disable this rule if your site is integrated with Payment Gateways such as PayPal 
RewriteCond %{HTTP_USER_AGENT} ^$ [OR] 
# Block out  use of illegal or unsafe characters in the User Agent variable 
RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR] 
# Measures to block out  SQL injection attacks 
RewriteCond %{QUERY_STRING} ^.*(;|<|>|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark).* [NC,OR] 
# Block out  reference to localhost/loopback/127.0.0.1 in the Query String 
RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR] 
# Block out  use of illegal or unsafe characters in the Query String variable 
RewriteCond %{QUERY_STRING} ^.*(<|>|%0A|%0D|%27|%3C|%3E|%00).* [NC]
RewriteCond %{QUERY_STRING} ^(%2d|\-)[^=]+$ [NC]
RewriteRule (.*) - [F,L]
Header set X-Frame-Options DENY
Header set X-XSS-Protection "1; mode=block"
#Header set X-Content-Security-Policy "allow 'self';"
Header set X-Content-Type-Options "nosniff"


Options All -Indexes
<IfModule mod_headers.c>
	Header unset Pragma
	FileETag None
	Header unset ETag
</IfModule>

<IfModule mod_expires.c>
	ExpiresActive On
	Header set Cache-Control "public"
	ExpiresDefault "access plus 1 days"
	#ExpiresByType application/javascript "access plus 1 days"
	#ExpiresByType application/x-javascript "access plus 1 days"
	ExpiresByType text/javascript "access plus 1 days"
	ExpiresByType text/html "access plus 1 days"
	ExpiresByType text/xml "access plus 1 days"
	ExpiresByType text/css "access plus 1 days"
	ExpiresByType text/plain "access plus 1 days"
	ExpiresByType image/gif "access plus 1 days"
	ExpiresByType image/jpg "access plus 1 days"
	ExpiresByType image/jpeg "access plus 1 days"
	ExpiresByType image/png "access plus 1 days"
	ExpiresByType image/bmp "access plus 1 days"
	#ExpiresByType application/x-shockwave-flash "access plus 1 days"
</IfModule>
<ifmodule mod_headers.c>
	<FilesMatch "\\.(ico|jpeg|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>
</ifmodule>
<FilesMatch "\.(html?|txt)$">
  ForceType 'text/html; charset=UTF-8'
</FilesMatch>

<FilesMatch "\.(css)$">
  ForceType 'text/css; charset=UTF-8'
</FilesMatch>

<FilesMatch "\.(js)$">
  ForceType 'text/javascript; charset=UTF-8'
</FilesMatch>

<FilesMatch "\.(css|js)$">
  Header append Vary Accept-Encoding
</FilesMatch>
<IfModule mod_deflate.c>
  # Compress HTML, CSS, JavaScript, Text, XML and fonts
  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
  AddOutputFilterByType DEFLATE text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent
</IfModule>
<files *.html>
SetOutputFilter DEFLATE
</files>
<files *.css>
SetOutputFilter DEFLATE
</files>
<files *.js>
SetOutputFilter DEFLATE
</files>
<files *.jpg>
SetOutputFilter DEFLATE
</files>
<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>