Drupal Development Resources

Force https via .htaccess

Sometimes it’s easier to more convenient to redirect via htaccess than the Secure Pages module when you want all pages to be secure.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.