views:

63

answers:

2

Greetings

I have a website with multiple subdomains, one subdomain per language: pl.example.com, en.example.cm, fr.example.com. I would like to keep one session across all subdomains so I'm setting session cookie and remember_me cookie for ".example.com". On the other hand all images should be served without cookies. Is it possible to tell the Apache to don't send cookies for this one particular subdomain (pl.example.com, en.example.com, fr.example.com - shared cookies, images.example.com - no cookies at all)

Best Regards A.

+1  A: 

In the appropriate httpd config section:

Header unset Set-Cookie

Or just don't try to set cookies in the first place.

Ignacio Vazquez-Abrams
A: 

I don't know a qualified solution to your question but - I'd build the structure another way:

- yourdomain.com
  - /pl
  - /en
  - /fr
  - /images

You would then be able to use mod_rewrite to rewrite your url pl.yourdomain.com to yourdomain.com/pl/.

I think this approach makes things much easier.

dhh
@dhh How does this solve the _problem_ (?) of not sending cookies with images? It's possible that the subdomains are already implemented as separate subdirectories in the file system?
w3d
in my answer I already stated, that it would _not_ answer the question. The rewriting was ment to have only _one vhost_ configuration - so you won't have problems with shared cookies.
dhh