note 45578 deleted from function.session-start by tomsommer
| From: | tomsommer@php.net | Date: | Sun, 12 Sep 2004 00:33:42 +0000 |
| Subject: | note 45578 deleted from function.session-start by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76494@lists.php.net to get a copy of this message | ||
Note Submitter: doshie at confuserfriendly dot net
----
In regards to the 'lose session info on redirect w/ IIS' people have been getting,
I've found a way to get around it server-side. It's certainly not ideal, but it's
worked for me..
<?
function redirect($uri) {
if ($_ENV['SERVER_SOFTWARE'] == 'Microsoft-IIS/5.0') {
header("Refresh: 0;URL=$uri");
} else {
header("Location: $uri");
}
die();
}
?>
And then, of course:
<?
redirect('xyz.php');
?>
will redirect without losing session data with either Apache or IIS.
Hope it helps someone.
Cheers.