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

Dimm - March 13, 2008 - 09:45
Project:Go - url redirects
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Dimm
Status:duplicate
Description

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)

AttachmentSize
gotwo_in_any_place_1.zip5.73 KB

#1

BioALIEN - March 18, 2008 - 20:35

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

#2

Slimer - January 20, 2009 - 01:49

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 :)

#3

hass - August 18, 2009 - 21:09
Status:needs work» 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.

 
 

Drupal is a registered trademark of Dries Buytaert.