Usage: https://detour.api.nbcupassport.com/protocol/target.host.name/some/paths/=query=/{{query}}/=sig=/{{signature}} will redirect to protocol://target.host.name/some/paths?{{query}} URLs need to be signed with the HMAC method using the secret key provided. The following is an example implementation in ruby: DETOUR_HOST = 'https://detour.mediapeers.mobi'.freeze DETOUR_SECRET = 'my-detour-secret-placeholder'.freeze require 'openssl' def detour_calculate_signature(url, secret = DETOUR_SECRET) digest = OpenSSL::Digest.new('sha1') OpenSSL::HMAC.hexdigest(digest, secret, url) end def detour_url(url, host = DETOUR_HOST, secret = DETOUR_SECRET) url = url.sub('?', '/=query=/') signature = detour_calculate_signature(url, secret) File.join(host, url.sub('://', '/'), "/=sig=/#{signature}") end Note: https://detour.api.nbcupassport.com/ does not support URLs ending in '/'