website/.htaccess

85 lines
2.2 KiB
ApacheConf
Raw Normal View History

2018-04-02 21:12:19 +00:00
RewriteBase /
RewriteEngine On
2017-11-06 21:45:23 +00:00
AddDefaultCharset utf-8
2018-04-02 21:12:19 +00:00
AddCharset UTF-8 .css .js .webmanifest
2017-11-06 21:45:23 +00:00
FileETag MTime Size
ServerSignature Off
SetEnvIf Host ^ suppress-error-charset
2018-02-19 14:04:40 +00:00
AddType image/x-icon .ico
AddType application/manifest+json .webmanifest
2018-04-02 21:12:19 +00:00
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
RewriteCond %{ENV:HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^flame.ga$
RewriteRule ^ https://kaboom.pw/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.flame.ga$
RewriteRule ^ https://kaboom.pw/$1 [R=301,L]
2018-02-19 14:04:40 +00:00
ErrorDocument 404 https://kaboom.pw/
2018-04-02 21:12:19 +00:00
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [R=404]
2018-02-19 14:04:40 +00:00
<FilesMatch ".(htm|html)$">
2018-04-02 16:24:21 +00:00
Header set Content-Security-Policy "default-src 'none'; font-src data:; form-action 'self'; img-src 'self'; manifest-src 'self'; style-src 'self'; upgrade-insecure-requests"
2018-02-19 14:04:40 +00:00
Header set X-Frame-Options "DENY"
Header set X-Xss-Protection "1; mode=block"
</FilesMatch>
2017-11-06 21:45:23 +00:00
Header set Referrer-Policy "no-referrer"
Header set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
Header set Vary "Accept-Encoding"
Header set X-Content-Type-Options "nosniff"
2018-02-19 14:04:40 +00:00
Header unset Accept-Ranges
Header unset Last-Modified
2018-04-02 21:12:19 +00:00
RewriteCond %{HTTP:Accept-Encoding} br
RewriteCond %{REQUEST_FILENAME}.br -f
RewriteRule ^(.*)$ $1.br [L]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [L]
AddEncoding br .br
AddEncoding gzip .gz
<FilesMatch (.css.br|.css.gz)>
ForceType "text/css; charset=utf-8"
</FilesMatch>
<FilesMatch (.ico.br|.ico.gz)>
ForceType image/x-icon
</FilesMatch>
<FilesMatch (.html.br|.html.gz)>
ForceType "text/html; charset=utf-8"
</FilesMatch>
<FilesMatch (.js.br|.js.gz)>
ForceType "text/javascript; charset=utf-8"
</FilesMatch>
<FilesMatch (.png.br|.png.gz)>
ForceType "image/png; charset=utf-8"
</FilesMatch>
<FilesMatch (.svg.br|.svg.gz)>
ForceType "image/svg+xml; charset=utf-8"
</FilesMatch>
<FilesMatch (.txt.br|.txt.gz)>
ForceType "text/plain; charset=utf-8"
</FilesMatch>
<FilesMatch (.webmanifest.br|.webmanifest.gz)>
ForceType "application/manifest+json; charset=utf-8"
</FilesMatch>
<FilesMatch (.xml.br|.xml.gz)>
ForceType "text/xml; charset=utf-8"
</FilesMatch>