I’ve been having a horriable time trying to get a page to redirect using a header()
my code:
if(isset($_COOKIE[‘refurl’])){
header(“Location: /”.$_COOKIE[‘refurl’]);
exit();
}
when it executes it gives me and “Invalid URI” error and the address bar of the pages looks like this:
http://www.MyHomepage.com/www.MyHomepage.com/articles/article1
When I take out the / at “Location : /” it does this endlessly:
http://www.MyHomepage.com/www.MyHomepage.com/articles/article1www.MyHomepage.com/articles/www.MyHomepage.com/articles/
http://www.MyHomepage.com/articles/www.MyHomepage.com/articles/ etc.
I’ve used all my brain power on this problem, and I just don’t know what to do.
Any help is greatly appreciated.