]> _ Git - swedish-care.git/commitdiff
Force domain redirect and HTTPS. Done #2800 @1.5 master
authorStephen Cameron <stephen@cubedesigners.com>
Mon, 3 Jun 2019 10:51:16 +0000 (12:51 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Mon, 3 Jun 2019 10:51:16 +0000 (12:51 +0200)
.htaccess

index 80c0e3e77b89cf0a0519f417a4f1d4533412ca97..e4410890d179baede194a13937de325247b2e045 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -1,3 +1,16 @@
+<IfModule mod_rewrite.c>
+
+# Redirect other domains like carita.nu
+RewriteCond %{HTTP_HOST} !^www.swedish-care\.se$ [NC]
+RewriteRule ^(.*)$ https://www.swedish-care.se/$1 [L,R=301]
+
+# Force HTTPS
+RewriteCond %{HTTPS} off
+RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
+
+</IfModule>
+
+
 # Downgrade PHP (Surftown) - remove this line if you want newer and faster
 AddType application/x-httpd-php-old .php