ltm rule command URI protocol
iRule(1) BIG-IP TMSH Manual iRule(1)
URI::protocol
Returns the protocol of the given URI.
SYNOPSIS
URI::protocol URI_STRING
DESCRIPTION
Returns the protocol of the given URI.
Syntax
URI::protocol
* Returns the protocol of the given URI by parsing the characters up
to the first :// instance.
RETURN VALUE
Returns the protocol of the given URI.
VALID DURING
ANY_EVENT
EXAMPLES
when RULE_INIT {
# Loop through some test URLs and URIs and log the URI::protocol value
foreach uri [list \
http://test.com \
https://test.com \
ftp://test.com \
sip://test.com \
myproto://test.com \
/test.com \
/uri?url=http://test.example.com/uri \
] {
log local0. "\[URI::protocol $uri\]: [URI::protocol $uri]"
}
}
# Log results:
[URI::protocol http://test.com]: http
[URI::protocol https://test.com]: https
[URI::protocol ftp://test.com]: ftp
[URI::protocol sip://test.com]: sip
[URI::protocol myproto://test.com]: myproto
[URI::protocol /test.com]:
[URI::protocol /uri?url=http://test.example.com/uri]:
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-9.0.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)