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
https://forums.phpfreaks.com/topic/90108-crazy-problem/
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.