Search code examples
httpurlrelative-path

Use port in relative url


Is there a way to specify i different port when getting data from a relative url?

example of relative urls:

~/path/page.html
../../path/page.html

What i would like to do is this:

:8012/path/page.html

Solution

  • No. You'll have to include the host name as well (see http://greenbytes.de/tech/webdav/rfc3986.html#rfc.section.4.2.p.1).