Patch:
gotwo_in_any_place_1.patch
Redirecting whithout check link in the Gotwo links base (www.site1.com/go/site2.com -> http://site2.com)

CommentFileSizeAuthor
gotwo_in_any_place_1.zip5.73 KBDimm

Comments

BioALIEN’s picture

Hi Dimm, can you elaborate further on your patch before I go ahead and review it?

An overview of the problem and how your patch resolves this. What action did you take? Any limitations to your method?

Thanks,

Dee

Slimer’s picture

Wow thanks man. This is really MUST HAVE feature (so please put this in release!)

BUT it does not redirects url with params.
Ex. /go/mysite.com/post.php?id=1
redirects to mysite.com/post.php

---------------
fixed problem above by changing line 134 from:
$res->dst = 'http://' . $src;
to:

$path = str_replace('q=go/','http://',$_SERVER['argv'][0]); 	//get full url request
$and1 = strpos($path,'&');				//get first & position
if($and1!==false) $path[$and1]='?';			//fix path (first & changed to ?)
$res->dst = $path;

maybe it's a little brute force, but it works :)

hass’s picture

Status: Needs work » Closed (duplicate)

There is no feedback for over one and a half year and I also do not understand the patch very well.

@Slimer: Your request sounds like a duplicate of #361215: Support for querystring and fragment in goto URL.