-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
44 lines (36 loc) · 2.06 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This is an example of a localhost .htaccess file for a Birdhouse application. Please adjust it to your needs.
# This will be used for your local development environment. For production, the htaccess file defined in the pipeline-config.js will be uploaded.
# Remember to replace YOUR_LOCAL_APPLICATION_PATH with the localhost path to your application. For example, if your application is located at http://localhost/Birdhouse, then the path would be /Birdhouse.
# Define Content Security Policy
Header set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; object-src 'none'; base-uri 'self'; frame-src 'none';"
# Prevent ClickJacking attacks
Header always set X-Frame-Options "DENY"
Header always set Content-Security-Policy "frame-ancestors 'none'"
# Prevent MIME type sniffing
Header always set X-Content-Type-Options "nosniff"
# Enforce the use of HTTPS
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header always set Referrer-Policy "no-referrer"
Header always set X-Download-Options "noopen"
Header always set X-Permitted-Cross-Domain-Policies "none"
Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()"
RewriteEngine On
# Redirect HTTP to HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Always serve index.html for any request
RewriteRule ^index\.html$ - [L]
# Always serve index.html for any request
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/timeless-tales(/|$)
RewriteCond %{REQUEST_URI} !^/minigame-collection(/|$)
RewriteCond %{REQUEST_URI} !^/calculator(/|$)
RewriteCond %{REQUEST_URI} !^/html-table-csv-converter(/|$)
RewriteCond %{REQUEST_URI} !^/stormworks-creations-manager(/|$)
RewriteCond %{REQUEST_URI} !^/creations-manager(/|$)
RewriteCond %{REQUEST_URI} !^/creations-manager-staging(/|$)
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{REQUEST_URI} !^/sitemap.xml
RewriteRule . /housebird_games/index.html [L]
FallbackResource /housebird_games/index.html