Jump to content

Header Redirection


malfist

Recommended Posts

I have this code:

if(isset($_SESSION['isLoggedIn']) || $_SESSION['isLoggedIn'] == false)
{
	header("Location: http://www.pragmaticpoems.com/membersOnly.php");
	die();
}

and it outputs:

Not Found

 

The requested URL /www.pragmaticpoems.com/membersOnly.php was not found on this server.

at the webpage http://www.pragmaticpoems.com/www.pragmaticpoems.com/membersOnly.php when I have it redirect.

But when I have:

if(isset($_SESSION['isLoggedIn']) || $_SESSION['isLoggedIn'] == false)
{
	header("Location: http://www.pragmaticpoems.com/membersOnly");
	die();
}

And it outputs:

Not Found

 

The requested URL /membersOnly was not found on this server.

at the page: http://www.pragmaticpoems.com/membersOnly

 

If I put the right name, it appends it to the current dir, if I put the wrong name it goes to the wrong file without a problem. This is driving me crazy. I've tried adding garbage to the end of .php with ? and defining a few unused variables but that doesn't work.

 

Anyone know what I'm doing wrong? Please! I'm pulling out my fingernails (I've already pulled out all my hair).

Link to comment
https://forums.phpfreaks.com/topic/55867-header-redirection/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.