In Symfony, sharing data across subdomains
I have a site on which I am doing credit card transactions.
The issue is this: if user goes to: http://mysite.com and then logic redirects user to https://www.mysite.com, I loose my session data.
As the title suggests, I am using Symfony, version 1.2
Now looking in my apps/site/config/factories.yml file, I added the below, but it didn;t work. Any ideas?
all:
routing:
class: sfP开发者_JAVA技巧atternRouting
param:
generate_shortest_url: true
extra_parameters_as_query_string: true
storage:
class: sfSessionStorage
param:
session_cookie_domain: .mysite.com
Will you consider, redirecting users to http://www.mysite.com, if they request the site http://mysite.com in the first place? So you can have everything under www.mysite.com domain.
http://www.symfonyexperts.com/question/show/id/1 might be what you're looking for
I tried the .mysite.com
param and it didn't work immediately. the reason was simply that I hadn't deleted the existing cookies, and they were interfering.
so just delete all cookies for your domain after adding the param, refresh page, and that 'should' do it.
精彩评论