[generic] add support for relative URLs (Fixes #1308)