Function Reference


Combines the base an relative URLs in canonical form

#include <WinAPIShPath.au3>
_WinAPI_UrlCombine ( $sUrl, $sPart [, $iFlags = 0] )


$sUrl The base URL.
$sPart The relative URL.
$iFlags [optional] The flags that specify how the URL is to be converted. It can be a combination of the following values.

Windows 7 or later

Return Value

Success: The combined URL.
Failure: Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.


Items between slashes are treated as hierarchical identifiers; the last item specifies the document itself.
You must enter a slash ("/" ) after the document name to append more items; otherwise, the function exchanges
one document for another.

If a URL string contains "/../" or "/./", _WinAPI_UrlCombine() usually treats the characters as if they
indicated navigation in the URL hierarchy. The function simplifies the URLs before combining them. For instance,
"/hello/cruel/../world" is simplified to "/hello/world". If the $URL_DONT_SIMPLIFY flag is set, the function
does not simplify URLs. In this case, "/hello/cruel/../world" is left as it is.

See Also

Search UrlCombine in MSDN Library.


#include <WinAPIShPath.au3>

Local $sUrl1 = 'http://xyz/abc/'
Local $sUrl2 = 'http://xyz/abc'

ConsoleWrite(_WinAPI_UrlCombine($sUrl1, 'bar') & @CRLF)
ConsoleWrite(_WinAPI_UrlCombine($sUrl2, 'bar') & @CRLF)