When you use alternative ports and hosts you won't be able to use some features because of redirections issues, I tracked the bug from smarty to this function and there is the bug and the solution:
(LINE 209)
return $requestUrlArray['scheme'] . '://' . $requestUrlArray['host'] . (
empty($requestUrlArray['path']) ? '' : $requestUrlArray['path'] ) .
( empty($requestUrlArray['port']) ? '' : ':' . (int)
$requestUrlArray['port'] ) . '?' . http_build_query($currentParams) . ( $anchor
=== null ? '' : '#' . trim($anchor) );
The port is after the path (WTF?)
SOLUTION, Replace with:
return $requestUrlArray['scheme'] . '://' . $requestUrlArray['host'] . (
empty($requestUrlArray['port']) ? '' : ':' . (int) $requestUrlArray['port'] ) .
( empty($requestUrlArray['path']) ? '' : $requestUrlArray['path'] ) . '?' .
http_build_query($currentParams) . ( $anchor === null ? '' : '#' .
trim($anchor) );
I hope to help, nice project.