Cant really help you on the location"redirect" issue.
I'm using the HTML tag refresh.
With a refresh every 10 minutes or so, that unsets the cookie. The cookie lives for sligthly less then 10 min.
This means. If the user does nothing in 10 minutes the cookie will be unset and the will be redirected with the refresh.
Something like this.
#If they do something:
IF (isset($cookie)) { SetCookie("cookie",$value,time()+600,"/","$URL",0);
}
#if they dont
IF (empty($cookie)) {
$expired=<meta http-equiv="refresh" content="0;URL=$redirect_url">
}
print "$expired";