x First time here? Check out the FAQ


    This function can return the value of any of the Server Variables in the current HTTP Request. eg. to get the user agent string of the browser being used to request a page you would use:

    <xsl:value-of select="umbraco.library:RequestServerVariables('HTTP_USER_AGENT')"/> 

    Example - How to create a fully qualified self referencing link

    To create a self referencing URL using the SERVER_NAME server variable:

    <xsl:attribute name="href">
    <xsl:value-of select="umbraco.library:RequestServerVariables('SERVER_NAME')"/>
    <xsl:value-of select="umbraco.library:NiceUrl($currentPage/@id)"/>
    Link Text

    This can also be written as:

    <a href="http://{umbraco.library:RequestServerVariables('SERVER_NAME')}{umbraco.library:NiceUrl($currentPage/@id)}">
    Link Text

    Using this page as an example, both of the above examples would return:

    <a href="http://our.umbraco.org/wiki/reference/umbracolibrary/requestservervariables">
    Link Text