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"
...
hoolio
Cirrostratus
Nov 30, 2006Hello,
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