问题
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:-
- Login to your Drupal site as admin
- Navigate to http://www.yourdomain.com/admin/build/securepages
- 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
- Save these configuratons
Step 2:-
- 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