paulj3000
paulj3000

Reputation: 309

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: sfPatternRouting
  param:
    generate_shortest_url:            true
    extra_parameters_as_query_string: true
  storage:
    class: sfSessionStorage
    param:
      session_cookie_domain: .mysite.com

Upvotes: 1

Views: 1307

Answers (3)

Ashton King
Ashton King

Reputation: 21

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.

Upvotes: 1

sjobe
sjobe

Reputation: 2837

http://www.symfonyexperts.com/question/show/id/1 might be what you're looking for

Upvotes: 1

sarp
sarp

Reputation: 3750

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.

Upvotes: 3

Related Questions