更改为HTTPS后无法登录Drupal 7 admin。访问被拒绝,cookie未设置 [英] Can not log in to Drupal 7 admin after changing to HTTPS. Access Denied and cookie not set
问题描述
在添加SSL证书并在url中强制HTTPS后,我无法再登录Drupal 7的管理区域。
I can no longer log into Drupal 7's admin area after adding SSL certificate and forcing HTTPS in url.
该网站以前通过HTTP协议提供服务并且工作得很好。我还想提一下,如果我恢复到HTTP模式,该网站将按预期工作。但是,我正在尝试实现HTTPS。
The website was previously served via HTTP protocol and worked perfectly fine. I would also like to mention that if I revert back to HTTP mode, the site will work as expected. However, I am trying to implement HTTPS.
此外,在登录时,我注意到cookie响应将由服务器发送,但它会立即被删除访问被拒绝的消息。
Additionally, while logging in, I have noticed that the cookie response would be sent by the server but it would get deleted immediately leading to access denied message.
到目前为止,在互联网上经过混合响应后,我在设置中玩了session.cookie,$ base_url和$ cookie_domain变量。 php文件。我还没有找到解决方案。
So far, after going through mixed response in the internet, I have played around with session.cookie, $base_url and $cookie_domain variables within settings.php file. I haven't found a solution yet.
有没有人遇到过这个问题?您的回复将受到高度赞赏。
Has anyone bumped into this problem? Your response will be highly appreciated.
推荐答案
在apache服务器中$
转到.httaccess
在 RewriteRule ^ - [E = protossl]
前添加#以禁用http
看起来像这样#RewriteRule ^ - [E = protossl]
这解决了问题
In apache server
Go to .httaccess
Add # in front of RewriteRule ^ - [E=protossl]
to disable http
It looks like this # RewriteRule ^ - [E=protossl]
This solves the problem
这篇关于更改为HTTPS后无法登录Drupal 7 admin。访问被拒绝,cookie未设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!