Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.