PHP session ends abruptly while using mod_rewrite in .htaccess
Hello Everyone
I have a shared web hosting account. I have a login script,which after successful login,sets $_SESSION["username"] to a particular value and redirects the user to index.php. In .htaccess I have written some rules to modify the URLs of this type: index.php?id=something to index-id-something.htm .
There are links in index.php which takes the user to this URL: index-id-something.htm. Now the problem is, in index.php the session works properly but when the URL is changed to index-id-something.htm the session gets destroyed automatically! But when I type this in URL : index.php?id=something session is not destroyed. It works properly.
What could be the possible problem? Any help will be highly appreciated.
Thank You Very Much!
|