$_SERVER['REQUEST_URI'] Gives completely wrong url
Hi when I display a page with a broken photo, the $_SERVER['REQUEST_URI'] becomes that photo url for some reason.
So if I'm on mysite.com/article.html
//somewhere in $html is <img src='mysite.com/photothatdoesntexist.jpg' />
//This is the only place that I ever call REQUEST_URI or ever set last_url.
$_SESSION['last_url'] = $_SERVER['REQUEST_URI'];
And somehow on the next pageload $_SESSION['last_url'] becomes "/photothatdoesntexist.jpg" instead of "/article.html"
Anyone know how that is possible?
Sounds like a flaky web server issue, though I may be missing some important detail. Is this by any chance some sort of AJAX implementation, or just a straight-ahead PHP page being called directly by the browser? (I'm not sure why that would matter, mind you.)
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
I've got a site with the same issue.
Did you ever find out what the deal was?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)