sorry to reopen this thread, but I need a a little clarification.
I cannot find any WA logout server behaviour. I think the Macromedia one is not suitable with WA pages.
So, this is what I have done:
I created a logout.php page and put the clear session variable in it (this will be triggered before page load).
Just under the clear session I added a php redirect code to the login page.
Here is the complete logout page code:
<?php
@session_start();
if ("" == ""){
// WA_ClearSession
$clearAll = TRUE;
$clearThese = explode(",","");
if($clearAll){
foreach ($_SESSION as $key => $value){
unset($_SESSION[$key]);
}
}
else{
foreach($clearThese as $value){
unset($_SESSION[$value]);
}
}
}
?>
<?php header("Location: index.php");
break;
?>
Is this right or is there a better way to logout?
I had to use the code above to redirect to login page because using the WA page access rule (logged in to users) would retain the logout.php page in the URL, thus not allowing to login any more.
I deactivated the "pass original query string on redirect" but it still create a redirect with logout.php in the URL.
I deactivate the"go to previous URL (if exists)" option but with the same result.
Clearing browser cache didn't help.
Any suggestion to make better logout page is appreciated ;).
tony