mdarling Posted August 19, 2010 Share Posted August 19, 2010 why does $_SERVER['HTTP_REFERER'] not get populated when a redirect is given using header( location:........) i am trying to redirect back to the login page if a user hasnot logged in yet but then re-direct back to the page they came from. Quote Link to comment https://forums.phpfreaks.com/topic/211176-header-and-_serverhttp_referer/ Share on other sites More sharing options...
nblackwood Posted August 19, 2010 Share Posted August 19, 2010 try using $_SERVER['REQUEST_URI'] instead Quote Link to comment https://forums.phpfreaks.com/topic/211176-header-and-_serverhttp_referer/#findComment-1101223 Share on other sites More sharing options...
mdarling Posted August 19, 2010 Author Share Posted August 19, 2010 unfortunately no.... but thank you for the suggestion Quote Link to comment https://forums.phpfreaks.com/topic/211176-header-and-_serverhttp_referer/#findComment-1101227 Share on other sites More sharing options...
mdarling Posted August 19, 2010 Author Share Posted August 19, 2010 ooops yes.. i was using it in the wrong context. request_uri is perfect.. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/211176-header-and-_serverhttp_referer/#findComment-1101259 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.