Search code examples
phpdrupaldrupal-6

how to enable HTTPS for the entire drupal 6 site?


I have Drupal 6 site.

Recently, I have purchased SSL from my hosting provider & configured on the hosting server.

How do I configure in Drupal,the complete site to use HTTPS ?

Whether the user enters

All such request should be redirected to https://www.hello.com


Solution

  • Enabling the HTTPS for the entire site.

    Step 1:-

    1. Login to your Drupal site as admin
    2. Navigate to http://www.yourdomain.com/admin/build/securepages
    3. Enable Secure Page & provide the Non-Secure Base Url & Secure Base Url https://www.drupalaid.com/blog/how-to-quickly-add-ssl-to-your-drupal-site
    4. Save these configuratons

    Step 2:-

    1. Add the below code-snippet to your .htaccess file

    this>>

     RewriteCond %{HTTPS} off [OR]
     RewriteCond %{HTTP_HOST} ^www.domainname\.com*
     RewriteRule ^(.*)$ https://domainname.com/$1 [L,R=301]
    

    Save & upload.

    Thats it.

    Useful Links:-