use url module to build targetUrl