views:

24

answers:

1

I'm planning the development of a website which will use parked domains to allow a single code base to drive multiple locale versions of a website.

What I have in mind is, when my index page is loaded to query my database to see if that particular host name has been added to a white list via a bespoke administration system. If so, the resultant row of site information (name, domain, locale etc.) is stored in a session variable.

My question is: if I did store this row in the session, would that session then be available to all of the other "sites" too (which I don't want)?

My thoughts for storing this information in the session were so I didn't have to query my database on each page for the site details. But if sessions are accessible by all parked domains, I'll have to re-factor my authentication handler too as that uses sessions (unrelated, I know!).

Thanks in advance.

A: 

Sessions usually rely on cookies, the browser will only send a cookie if the domain it was set from matches the domain of the resources you are requesting. So even if you're using the same code for all your various domains as long as that code is being referenced by different URLs you will be fine.

ILMV
Thanks! That makes sense.
Martin Bean