-
-
Save emhaye/2a2e600fa50a5fb5aa6ac2372f15ece3 to your computer and use it in GitHub Desktop.
Revisions
-
vielhuber revised this gist
Sep 15, 2018 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -134,4 +134,8 @@ RewriteRule ^ https://%1.tld.org%{REQUEST_URI} [NE,L,R] # RewriteCond %{HTTP_HOST} !\.local$ [NC] # RewriteCond %{HTTP_HOST} !\.xip\.io$ [NC] # RewriteCond %{HTTP_HOST} ^www\..+$ [NC] # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] -
vielhuber revised this gist
Sep 15, 2018 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,7 +91,11 @@ RewriteRule ^.*$ https://www.camac-harps.com%{REQUEST_URI} [R,L] # # force https # RewriteCond %{HTTP_HOST} !\.xip\.io$ [NC] # RewriteCond %{HTTP_HOST} !\.local$ [NC] # RewriteCond %{HTTPS} !=on [NC] # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # force ssl and non-www for main domain and for all subdomains (except local) RewriteEngine On -
vielhuber revised this gist
Sep 15, 2018 . 1 changed file with 27 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -104,4 +104,30 @@ RewriteRule ^ https://tld.org%{REQUEST_URI} [R=301,L,NE] RewriteCond %{HTTP_HOST} !^local\.tld\.org$ [NC] RewriteCond %{SERVER_PORT} 80 RewriteCond %{HTTP_HOST} ^((?!www\.)[^.]+)\.tld\.org$ RewriteRule ^ https://%1.tld.org%{REQUEST_URI} [NE,L,R] # # force www except on development machines (.local & .xip.io) # RewriteCond %{HTTPS} !=on # RewriteCond %{HTTP_HOST} !\.local$ [NC] # RewriteCond %{HTTP_HOST} !\.xip\.io$ [NC] # RewriteCond %{HTTP_HOST} !^www\..+$ [NC] # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # # https # RewriteCond %{HTTPS} =on # RewriteCond %{HTTP_HOST} !\.local$ [NC] # RewriteCond %{HTTP_HOST} !\.xip\.io$ [NC] # RewriteCond %{HTTP_HOST} !^www\..+$ [NC] # RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # # force non-www except on development machines (.local & .xip.io) # RewriteCond %{HTTPS} !=on # RewriteCond %{HTTP_HOST} !\.local$ [NC] # RewriteCond %{HTTP_HOST} !\.xip\.io$ [NC] # RewriteCond %{HTTP_HOST} ^www\..+$ [NC] # RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # # https # RewriteCond %{HTTPS} =on # RewriteCond %{HTTP_HOST} !\.local$ [NC] # RewriteCond %{HTTP_HOST} !\.xip\.io$ [NC] # RewriteCond %{HTTP_HOST} ^www\..+$ [NC] # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] -
vielhuber revised this gist
Sep 22, 2017 . 1 changed file with 20 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -85,4 +85,23 @@ RewriteRule ^.*$ https://%1%{REQUEST_URI} [R,L] RewriteCond %{HTTP_HOST} !\.local$ [NC] RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} ^camac-harps\.com$ [NC] RewriteRule ^.*$ https://www.camac-harps.com%{REQUEST_URI} [R,L] # force ssl and non-www for main domain and for all subdomains (except local) RewriteEngine On # main domain RewriteCond %{HTTP_HOST} ^(www\.)?tld\.org$ [NC] RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteRule ^ https://tld.org%{REQUEST_URI} [R=301,L,NE] # subdomains RewriteCond %{HTTP_HOST} !^local\.tld\.org$ [NC] RewriteCond %{SERVER_PORT} 80 RewriteCond %{HTTP_HOST} ^((?!www\.)[^.]+)\.tld\.org$ RewriteRule ^ https://%1.tld.org%{REQUEST_URI} [NE,L,R] -
vielhuber revised this gist
Dec 9, 2016 . 1 changed file with 17 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,4 +69,20 @@ RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] </IfModule> # force ssl and www for main domain, force ssl and non www for all subdomains (except locally) RewriteEngine On # for subdomains: force ssl and non www RewriteCond %{HTTP_HOST} !\.local$ [NC] RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} !^(www\.)?camac-harps\.com$ [NC] RewriteCond %{HTTP_HOST} ^(?:www\.|)(.*)$ [NC] RewriteRule ^.*$ https://%1%{REQUEST_URI} [R,L] # for main domains: force ssl and www RewriteCond %{HTTP_HOST} !\.local$ [NC] RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} ^camac-harps\.com$ [NC] RewriteRule ^.*$ https://www.camac-harps.com%{REQUEST_URI} [R,L] -
vielhuber revised this gist
Sep 20, 2016 . No changes.There are no files selected for viewing
-
vielhuber revised this gist
Aug 4, 2016 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,6 +46,10 @@ RewriteCond %{HTTP_HOST} !\.dev$ [NC] RewriteCond %{HTTP_HOST} !\.local$ [NC] RewriteCond %{HTTP_HOST} !^www\.domain\.de [NC] RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] RewriteCond %{HTTP_HOST} !\.dev$ [NC] RewriteCond %{HTTP_HOST} !\.local$ [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] # force www only RewriteEngine on -
vielhuber revised this gist
Aug 3, 2016 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,6 +40,13 @@ RewriteEngine on ... </IfModule> # not locally #2 RewriteEngine On RewriteCond %{HTTP_HOST} !\.dev$ [NC] RewriteCond %{HTTP_HOST} !\.local$ [NC] RewriteCond %{HTTP_HOST} !^www\.domain\.de [NC] RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] # force www only RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. -
vielhuber revised this gist
Jun 16, 2016 . No changes.There are no files selected for viewing
-
vielhuber revised this gist
Apr 14, 2016 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,17 @@ RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR] RewriteCond %{HTTPS} off RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L] # alternative way RewriteCond %{HTTP_HOST} !^$ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTPS}s ^on(s)| RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L,NE] # without lookbehind RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.domain\.de [NC] -
vielhuber revised this gist
Jan 31, 2016 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,13 @@ RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] # force HTTPS and www not for subdomains RewriteCond %{HTTP_HOST} ^domain\.de [NC] RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www\.domain\.de [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] # for cloudflare RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} =http -
vielhuber revised this gist
Sep 28, 2015 . 1 changed file with 16 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,4 +25,19 @@ RewriteEngine on # force www only RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # force HTTPS and non-www <IfModule !mod_win32.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)(.+) [OR] RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^(www\.)?(.+) RewriteRule ^ https://%2%{REQUEST_URI} [R=301,L] </IfModule> <IfModule mod_win32.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] </IfModule> -
vielhuber revised this gist
Aug 11, 2015 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,4 +20,9 @@ RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] <IfModule !mod_win32.c> RewriteEngine on ... </IfModule> # force www only RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] -
vielhuber revised this gist
Jul 2, 2015 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,11 +5,19 @@ RewriteCond %{HTTPS} off RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L] # without lookbehind RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.domain\.de [NC] RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] # for cloudflare RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # not locally <IfModule !mod_win32.c> RewriteEngine on ... </IfModule> -
vielhuber revised this gist
Apr 21, 2015 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,14 @@ RewriteEngine On RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR] RewriteCond %{HTTPS} off RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L] # without lookbehind RewriteCond %{HTTP_HOST} !^www\.domain\.de [NC] RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.de/$1 [R=301,L] # for cloudflare RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] -
vielhuber created this gist
Apr 21, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ # force HTTPS and www. RewriteEngine On RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR] RewriteCond %{HTTPS} off RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L]