bugfix #123; resolve http redirects in REST.php