Skip to content

Instantly share code, notes, and snippets.

@alex-ahumada
Created March 13, 2018 13:26
Show Gist options
  • Save alex-ahumada/d643afc21e7bbec726b5a63d1e32f59a to your computer and use it in GitHub Desktop.
Save alex-ahumada/d643afc21e7bbec726b5a63d1e32f59a to your computer and use it in GitHub Desktop.
Drupal 8 - Force redirect to https
<IfModule mod_rewrite.c>
# Redirect to https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment