Php sessions don't work after htaccess rewriterule?

Up vote 0 down vote favorite share g+ share fb share tw.

I have a booking system that i'm trying to set up. I want to use the same functions for all customers. I have set up htaccess rewriterule to make it look like all the files are run from mydomain.com/web-book/customerX/index.php , but in fact the files are located in the web-book folder.

This is just for nice displaying and for giving each customer an easy link to their bookings. RewriteRule ^(a-zA-Z+)/(_a-zA-Z-+)\. Php$ /web-book/$2.

Php? Site=$1 I'm also moving my css/images with the same technique working fine. Javascripts working fine.

Everything is good except the php Sessions. THE PROBLEM: The php $_Session variables won't work, meaning I can't log in or do anything involving sessions. There must be something that i'm missing?

I wan't my session vars to the accessible all over mydomain.com if possible? Php . Htaccess session mod-rewrite session-variables link|improve this question asked Aug 19 '11 at 19:45Michel Edkrantz82.

If so, try to use the QSA flag: RewriteRule ^(a-zA-Z+)/(_a-zA-Z-+)\. Php$ /web-book/$2. Php?

Site=$1 QSA This will preserve any Get-Variable in Querystring, including Session IDs.

I just found out...2min ago that I forgot that. Thanks for helping anyway, problem solved :) I feeel so stupid sometimes ;) – Michel Edkrantz Aug 19 '11 at 20:10.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions