All external urls in Civimail mailings cause a 500 error when clicked.
I have traced the source of the error to line 441 in CRM/Utils/System.php.
This is my suggested patch, simply replacing the problem line with the previous version, but I don't know whether this affects anything else:
– self::setHttpHeader('Location', $url);
++ header('Location: ' . $url);
I've not tried to replicate on the demo site, as I don't think that allows for mailings to be sent out