Sunday, January 1, 2017

Drupal 7 HTTPS Setup

Change the Base URL in Settings.php

$base_url = 'https://domainname.com';

and add the code in .htaccess

# Redirect to HTTPS
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Clear the cache and check it

No comments:

Post a Comment

Difference between hook_boot and hook_init Drupal

hook_boot() hook_init() hook_boot() will executes even on cached pages hook_init() will not executes on cached pages hook_boot() is ...