如何为整个drupal 6网站启用HTTPS? [英] how to enable HTTPS for the entire drupal 6 site?
本文介绍了如何为整个drupal 6网站启用HTTPS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有Drupal 6网站。
最近,我从我的主机提供商&在主机服务器上配置。
如何在Drupal中配置完整的站点以使用HTTPS?
用户是否输入
- http://www.hello.com
- https://www.hello.com
- hello.com
所有这些请求都应该重定向到 https://www.hello.com
解决方案
启用整个站点的HTTPS。
步骤1: -
- 以管理员身份登录到您的Drupal网站
- 导航到 http://www.yourdomain.com/admin/build/securepages
- 启用安全页面&提供非安全基础网址安全基地址
https: //www.drupalaid.com/blog/how-to-quickly-add-ssl-to-your-drupal-site - 保存这些配置
步骤2: -
- 添加以下代码段到你的.htaccess文件
这个>>
code> RewriteCond%{HTTPS}关闭[OR]
RewriteCond%{HTTP_HOST} ^ www.domainname\.com *
RewriteRule ^(。*)$ https://domainname.com / $ 1 [L,R = 301]
保存&
这是它。
有用的链接: -
- https://www.drupal.org/https-information
- https://www.drupalaid.com/blog/how-to-quickly-add-ssl-to-your-drupal-site
- < a href =https://www.drupal.org/node/1445436 =nofollow> https://www.drupal.org/node/1445436
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
解决方案
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
这篇关于如何为整个drupal 6网站启用HTTPS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文