how to enable HTTPS for the entire drupal 6 site?

我与影子孤独终老i 提交于 2019-12-13 06:15:05

问题


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

  • http://www.hello.com
  • https://www.hello.com
  • hello.com

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


回答1:


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:-

  • https://www.drupal.org/https-information
  • https://www.drupalaid.com/blog/how-to-quickly-add-ssl-to-your-drupal-site
  • https://www.drupal.org/node/1445436


来源:https://stackoverflow.com/questions/37051363/how-to-enable-https-for-the-entire-drupal-6-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!