开发者

One subdomain without cookies

Greetings

I have a website with multiple subdomains, one subdomain per language: pl.example.com, en.example.cm, fr.e开发者_运维知识库xample.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.


In the appropriate httpd config section:

Header unset Set-Cookie

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜