Function Reference


Converts a URL string into canonical form

#include <WinAPIShPath.au3>
_WinAPI_UrlCanonicalize ( $sUrl, $iFlags )


$sUrl The URL.
$iFlags 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 converted URL.
Failure: Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.


If a URL string contains "/../" or "/./", _WinAPI_UrlCanonicalize() 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 UrlCanonicalize in MSDN Library.


#include <APIShPathConstants.au3>
#include <WinAPIShPath.au3>

Local $sUrl = ''

ConsoleWrite(_WinAPI_UrlCanonicalize($sUrl, $URL_UNESCAPE) & @CRLF)