Name

makeurl — construct url's based on hostname, port.

Synopsis

::rivet::makeurl ?filename?

Description

Create a self referencing URL from a filename. makeurl can be used in three ways

  • With no arguments the current script URL is returned
  • The argument is a relative path: the command returns the argument prefixed with the current script's URL
  • The argument is an absolute path: the full URL to the resource is returned

Example with an absolute path:

::rivet::makeurl /tclp.gif

returns http://[hostname]:[port]/tclp.gif. where hostname and port are the hostname and port of the server in question. The protocol prefix is inferred from the protocol in the URL referencing the script.