When creating a redirect to "node/1" which has the path "members/tci-new-members" it ends up redirecting to "memberstci-new-members" because my site is installed in the root directory and the $base variable is "/".
I fixed it by changing line 135 from
$url = str_replace($base, '', url($path, $url));
to
$url = url($path, $url);
but I understand that your thing has a purpose so it's not a great fix.
Now it redirects to http://mysite.com//members/tci-new-members (notice the two '/'s). I can't work out why this is because the url function shouldn't return an absolute value but it is.
Let me know if you need any more information.
Comments
Comment #1
Schoonzie commentedI made a few changes and changing line 135 to
$url = substr_replace(url($path, $url), '', 0, strlen($base));works fine. I haven't tested it for other sites with other languages or on sites in sub directories, but I think it should work.
Comment #2
rsvelko commentedusing a preg_replace in the latest 2.6. It will work as expected - I am 100% sure.
Comment #4
ChrisRut commentedAbsolute URL Redirects in 6.x-2.6 have two // (forwardslashes) ?
i.e.
Static Destination URL = http://mysite.com/node/123
Redirects to: http://mysite.com//node/123 (Notice double forwardslashes)
However if you use Relative URL, it works fine:
Static Destination URL = node/123
Redirects to: http://mysite.com/node/123
Comment #5
rsvelko commentedmake them all w/o a / at the beginning.
The next maintainer should add a stripping function that takes care of this.
Comment #6
ChrisRut commentedThis issue seems to be resolved with the latest version (6.x-2.10)
Comment #7
ChrisRut commentedCome to find out it was upgrading core from 6.15 to 6.16 that resolved this. Probably not the upgrade to Login_Destination (2.6>2.10). Either way it's fixed :)
Most likely having to do with the changes to common.inc drupal_goto():