NaviServer - programmable web server
4.99  5.0

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

ns_pagepath(n) 5.0.0a naviserver "NaviServer Built-in Commands"

Name

ns_pagepath - Return path to current virtual server pages

Table Of Contents

Synopsis

Description

This is virtual hosting aware command will return absolute path to the directory with pages for the current virtual server

COMMANDS

ns_pagepath ?-host value? ?--? ?path-segment ...?

Returns the absolute path to current virtual server page directory followed by the optional path segments. Similar to ns_serverpath.

The optional -host parameter can be used to return the path for a certain virtual host. If not specified the value for the host is taken from the host header field of the current request.

EXAMPLES

 % ns_pagepath
 /usr/local/ns/pages
 
 % ns_pagepath foo bar
 /usr/local/ns/pages/foo/bar

See Also

ns_serverpath, nsd

Keywords

NaviServer, global built-in, virtual host