@@ -70,6 +70,31 @@ AddType image/webp .webp
7070 RewriteCond %{HTTPS} on
7171 RewriteRule ^ - [E=protossl:s]
7272
73+ # Redirect HTTP to HTTPS on cloud
74+ RewriteCond %{ENV:AH_SITE_ENVIRONMENT} !^$
75+ RewriteCond %{HTTPS} off
76+ RewriteCond %{HTTP:X-Forwarded-Proto} !https
77+ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301 ]
78+
79+ RewriteCond %{HTTP_HOST} .
80+ RewriteCond %{HTTP_HOST} ^drupalgovcon.org [NC]
81+ RewriteCond %{HTTP_HOST} !^www\. [NC]
82+ RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301 ]
83+
84+ #Redirects for Archived Static Sites
85+ RewriteCond %{REQUEST_URI} ^/drupal-govcon-2015 [NC]
86+ RewriteRule ^drupal-govcon-2015/?$ /drupal-govcon-2015/index.html [NC,R,L]
87+ # Redirect GovCon 2015 path with or without / to index.html
88+ RewriteCond %{REQUEST_URI} ^/drupal-govcon-2015/ [NC]
89+ RewriteRule ^drupal-govcon-2015/(.*)$ /static-sites/2015/$1 [PT,L]
90+ # Pass-through the matching file from beneath folder and stop processing
91+ # Pass-through the matching file from beneath /sites/default/files/SOME-FOLDER and stop processing
92+ RewriteCond %{REQUEST_URI} ^/2015 [NC]
93+ RewriteRule ^2015/?$ /drupal-govcon-2015/index.html [NC,R,L]
94+ # Redirect GovCon 2015 path with or without / to index.html
95+ RewriteCond %{REQUEST_URI} ^/2015/ [NC]
96+ RewriteRule ^2015/(.*)$ /static-sites/2015/$1 [PT,L]
97+
7398 # Make sure Authorization HTTP header is available to PHP
7499 # even when running as CGI or FastCGI.
75100 RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization }]
0 commit comments