I have this page www.exmaple.com/username which is rewritten url, but the sessions does not work there.
That is, when I echo, it does not show the value, but all the other pages that have not been re-written are working!
Is there something that I'm missing?
Does this rewrite involve a change of domain or subdomain in the URL? Cookies are, by default, accessible only to the same subdomain they were set on... and session identifiers are maintained by cookies.
Sessions are not affected by mod_rewrite, but you need to prepend every page with
You must call
session_start() to read the session or
$_SESSION will not be populated.