I have this page http://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!
<?php session_start();
echo $_SESSION['user_id'];
?>
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.