Jump to content

Crazy Problem


kalyke

Recommended Posts

This is my redirection code:

 

1  if(isset($_COOKIE['refurl'])){

2  $CookieRefurl = $_COOKIE['refurl'];

3  $CookieJar = str_ireplace("www.MyHomepage.com", "", "$CookieRefurl");

4  $Home = "Http://www.MyHomepage.com";

5  header("Location: ".$Home.$CookieJar);

6  exit();

7  }else{

8  header("Location: http://www.fromhousetohome.com/preview");

9  exit();

10 }

 

If I run it like this it redirects "Http://www.MyHomePage.comCookieRefurl" which is right except its missing the /

So then I addes a slash on line 3 at the end of the url like this: ("www.MyHomepage.com/", ...

It doesn't work at all

So then I tried something like this ("www.MyHomepage.com" , "/" ,

No good then I tried ("www.MyHomepage.com", "//", ....

And I get something like this: "Http://www.MyHomePage.com///CookieRefurl"

 

To sum up, I can either have no slashes or too many or it doesn't work.

 

Anybody have ideas how I can fix this.

Link to comment
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.