| mihailokg@gmail.com 2006-09-26, 1:32 am |
| Hi all,
I tried to find solution for the code bellow but for now I did nothing.
Please if somebody know solution, post it here.
Thanks guys
When I logged in to the site and go to the page using a link or typing
the URL of the fake subdomain example: http://subdomain.domain.com, my
session dissapeared. Everytime I go to
the page even I am logged in, I was logged out or not totally logged
out because when i go back to the page without the subdomain, i was
logged in again.
Seems like using the subdomain my session dissapeared but the session
is there when i go back to the page without the subdomain.
I am using this code for .htaccess file
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteCond %{HTTP_HOST} ([^.]+)\.domain\.com
RewriteRule ^$ http://www.domain.com/page.php?subdomain=%1 [L]
This works but there are no sessions created earlier.
If I put at the end of last line [R,L] page works but new URL is
http://www.domain.com/page.php?subdomain=subdomain and I want to stay
subdomain.domain.com and sessions to be visible.
|