I’m using $_SERVER["HTTP_REFERER"] to create a "take me back" link that I save in a $_SESSION variable for use on another page.
It’s working fine except that, under certain circumstances, the link shows up as something like this: http://localhost/modx097/?id=4&err=1 which MODx chokes on.
The &err=1 isn’t coming from MODx, but I don’t know what causes it. It only seems to happen when I start by previewing the page with $_SERVER["HTTP_REFERER"] from the manager and then only the *second* time I visit the page and (I think) only in IE7.
I don’t think it would ever happen to a visitor to the site, but I’d feel better if I knew what caused it.
-
MODX Staff
- 10,725 Posts
Actually, that is from MODx. See DocumentParser->sendRedirect() to understand when this would appear.
Quote from: OpenGeek at Oct 20, 2008, 01:50 PM
Actually, that is from MODx. See DocumentParser->sendRedirect() to understand when this would appear.
Thanks. It looks like this fixed it (though why it would only happen in IE7 is still a mystery):
$modx->sendRedirect($responseURL,0);