Jump to content

Recommended Posts

So I'm trying to retrieve URL in http://www.mysite.com/page1.php?url=http://www.yahoo.com in $_GET['url'] when I access that page.

 

However if I do it like above $_GET['url'] it returns http:/www.yahoo.com with a missing slash.

 

If I url encode http://www.yahoo.com (http://www.mysite.com/page1.php?url=http%3a%2f%2fwww.yahoo.com) the %2F (the slash) causes it to fail with

 

"Not Found

 

The requested URL /page1.php?url=http://www.yahoo.com was not found on this server."

 

Running Apache2.2 and Zend Core (latest version).

 

Thanks,

Chris

Link to comment
https://forums.phpfreaks.com/topic/118139-solved-url-within-a-url/
Share on other sites

Ok, thanks. Actually I was just gonna take in the www.yahoo.com and add in http:// afterwards. But it's still weird because I have SMF installed on the same server and in one of their URLs they take http:// and it works not only that I type in %2F in their URL (on the same server) and it produces NO ERROR. I hope this doesn't turn out like that time I spent hours trying to figure out what made some of my pages shift left (turned out to be the scrollbar appearing and disappearing).

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.