Author: shazron
Date: Tue Jul 17 06:26:05 2018
New Revision: 1836083

URL: http://svn.apache.org/viewvc?rev=1836083&view=rev
Log:
CB-14210 - Add .htaccess redirect from http to https

Modified:
    cordova/site/public/.htaccess

Modified: cordova/site/public/.htaccess
URL: 
http://svn.apache.org/viewvc/cordova/site/public/.htaccess?rev=1836083&r1=1836082&r2=1836083&view=diff
==============================================================================
--- cordova/site/public/.htaccess (original)
+++ cordova/site/public/.htaccess Tue Jul 17 06:26:05 2018
@@ -580,3 +580,20 @@ RewriteRule ^.*/plugins/authors.html$ /d
 #       before them will rewrite "/latest/" to the latest version and redirects
 #       for "/latest/some/path.html" will never activate.
 RewriteRule ^.*docs/(\w\w(?:-\w\w)?)/latest/(.*)$ /docs/$1/8.x/$2 [L]
+
+
+# Redirect http to https
+# From Cordova PMC Member raphinesse 
+# https://s.apache.org/An8s
+
+RewriteEngine On
+
+# If we receive a forwarded http request from a proxy...
+RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
+
+# ...or just a plain old http request directly from the client
+RewriteCond %{HTTP:X-Forwarded-Proto} =""
+RewriteCond %{HTTPS} !=on
+
+# Redirect to https version
+RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to