]> git.mxchange.org Git - friendica.git/commitdiff
add simple option for HTTPS in .htaccess
authorChristian González <nerdoc@users.noreply.github.com>
Sat, 30 Jan 2016 22:21:03 +0000 (23:21 +0100)
committerChristian González <nerdoc@users.noreply.github.com>
Sat, 30 Jan 2016 22:21:03 +0000 (23:21 +0100)
people have it easier to just uncomment 2 lines if they want such an important feature

.htaccess

index 1b63f9ad6fb2b81060f5da54cdc82277ceb7f310..8c8a8861c466824316310e6a7cf25823bfd37a62 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -30,5 +30,9 @@ Deny from all
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?pagename=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
 
+  # If you want to restrict access to your Friendica site to HTTPS only,
+  # uncommment the following lines
+  RewriteCond %{HTTPS} !=on
+  RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
 </IfModule>