dsh8009271 2015-07-26 19:22
浏览 35
已采纳

子域名的Magento cookie设置

When I am installing Magento under a subdomain of my production domain, I cannot login to magento admin. For example, my domain name is example.com where I have installed magento and it is in production, I am ok with admin login.

However, I have a subdomain called test.example.com and I installed magento there for testing purpose. Now, if I try to login to the test site, I can't login. The username and passwords are correct. I see no error message. It just reloads the same login page. Same things happens when I try to login to my production site admin panel.

If I clear the cookies related to example.com and test.example.com and then try to login to the admin panel of example.com, I am fine. Now, when I try to login to test.example.com admin panel, the problem starts again.

This is what my Session Cookie management settings

Is there anybody who can help me solving this issue?

  • 写回答

2条回答 默认 最新

  • doudou20145 2015-07-26 21:03
    关注

    Your live system's cookie are set for .example.com, which means for your live system's domain and also all subdomains. Because test.example.com is a subdomain, both cookies are valid for it.

    Try the following settings, then Magento will set cookies for .www.example.com and .test.example.com and your live domain's cookies will not interfere with your subdomain's.

    live domain

    subdomain

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 关于用python写支付宝扫码付异步通知收不到的问题
  • ¥50 vue组件中无法正确接收并处理axios请求
  • ¥15 隐藏系统界面pdf的打印、下载按钮
  • ¥15 MATLAB联合adams仿真卡死如何解决(代码模型无问题)
  • ¥15 基于pso参数优化的LightGBM分类模型
  • ¥15 安装Paddleocr时报错无法解决
  • ¥15 python中transformers可以正常下载,但是没有办法使用pipeline
  • ¥50 分布式追踪trace异常问题
  • ¥15 人在外地出差,速帮一点点
  • ¥15 如何使用canvas在图片上进行如下的标注,以下代码不起作用,如何修改