The session ID is usually stored in a cookie, cookies are stored by URL, so if the URL changes the cookie will not read. You need to pass the session id along the URL.
eg:
$url = "https://www.mysite.com/post.php?".SID
🙂 hope this helps...
But on the other hand im pretty sure im wrong 😃..in this case you probably need to have the user login under HTTPS 🙂