Forum Discussion
madi_56757
Nimbostratus
Nov 30, 2006findstr help
Hello together;
I need a little help with the find sting command
when HTTP_REQUEST {
set hostname [findstr [HTTP::host] ":"]
log local0. "Host - $hostname"
Ok what i like to do is normaly easy
the request is followed
https://abc.easy.com:51000/index.html
what i need is only the hostname and not the port:
Nov 30 16:12:51 tmm tmm[810]: Rule hostname : Host - :51000
thanks a lot
Madi
1 Reply
- hoolio
Cirrostratus
Hello,
If you're trying to get the hostname without the port, you can split on : and take field 1:
(Click here)set host [getfield [HTTP::host] ":" 1]
The second field should be the port:set port [getfield [HTTP::host] ":" 2]
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects