Skip to content

Commit

Permalink
Merge pull request #7 from DIVD-NL/beta
Browse files Browse the repository at this point in the history
Adding beta.divd.nl
  • Loading branch information
MrSeccubus authored Apr 2, 2024
2 parents d2b02f0 + a60857a commit bc492b7
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions deploy/.htaccess
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
RewriteEngine On
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
Header always append X-Frame-Options DENY
Header set X-Content-Type-Options nosniff
Header set X-XSS-Protection "1; mode=block"
Header set Referrer-Policy same-origin

# Redirect http -> https
RewriteCond %{HTTP:X-HTTPS-SESSION} !^yes$
Expand All @@ -15,14 +19,14 @@ SetEnvIfNoCase X-HTTPS-Session Yes HTTPS=on
RewriteCond %{HTTP_HOST} ^divd\.nl [NC]
RewriteRule (.*) https://www.divd.nl/$1 [r=301,L]

# Serve www from divd-nl
# Serve www from divd-nl-2024
RewriteCond %{HTTP_HOST} ^www\.divd\.nl [NC]
RewriteCond %{REQUEST_URI} !^/divd-nl [NC]
RewriteRule (.*) divd-nl/$1 [L]
RewriteRule (.*) divd-nl-2024/$1 [L]

# Redirect when I summon a directory without a trailing slash
RewriteCond %{HTTP_HOST} ^www\.divd\.nl [NC]
RewriteCond %{REQUEST_URI} ^/divd-nl.*[^/]$ [NC]
RewriteCond %{REQUEST_URI} ^/divd-nl-2024.*[^/]$ [NC]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^divd-nl/(.*) /$1/ [L,r=301]

Expand Down Expand Up @@ -88,6 +92,30 @@ RewriteCond %{REQUEST_URI} ^/divd\.fund.*[^/]$ [NC]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^divd.fund/(.*) /$1/ [L,r=301]

# beta.divd.nl

## Serve beta.divd.nl from beta
#RewriteCond %{HTTP_HOST} ^beta\.divd\.nl [NC]
#RewriteCond %{REQUEST_URI} !^/beta [NC]
#RewriteRule (.*) beta/$1 [L]
#
## Redirect when I summon a directory without a trailing slash
#RewriteCond %{HTTP_HOST} ^beta\.divd\.nl [NC]
#RewriteCond %{REQUEST_URI} ^/beta.*[^/]$ [NC]
#RewriteCond %{REQUEST_FILENAME} -d
#RewriteRule ^beta/(.*) /$1/ [L,r=301]

# Serve beta.divd.nl from divd-nl
RewriteCond %{HTTP_HOST} ^beta\.divd\.nl [NC]
RewriteCond %{REQUEST_URI} !^/divd-nl [NC]
RewriteRule (.*) divd-nl/$1 [L]

# Redirect when I summon a directory without a trailing slash
RewriteCond %{HTTP_HOST} ^beta\.divd\.nl [NC]
RewriteCond %{REQUEST_URI} ^/divd-nl.*[^/]$ [NC]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^beta/(.*) /$1/ [L,r=301]

# divd.global

# redirect divd.global to www.divd.nl
Expand Down

0 comments on commit bc492b7

Please sign in to comment.