NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_absoluteurl(n) 4.99.30 naviserver "NaviServer Built-in Commands"

Name

ns_absoluteurl - Construct a completed URL from an incomplete URL based on a base URL

Table Of Contents

Synopsis

Description

COMMANDS

ns_absoluteurl incompleteurl baseurl

Construct a completed URL from a incomplete (e.g. relative) URL by taking as many parts as possible from the provided base URL. The function uses internally ns_parseurl for parsing the provided URLs into its components.

EXAMPLES

 % ns_absoluteurl foo.html http://openacs.org//projects/openacs/download/
 http://openacs.org//projects/openacs/download/foo.html
 
 % ns_absoluteurl foo.html {http://[::1]:80/t.html}
 http://[::1]:80/foo.html
 
 % ns_absoluteurl //google.com/ https://openacs.org/forums
 https://google.com/

See Also

ns_parseurl

Keywords

global built-in, url