Forum Discussion
Tom_Kilday_9259
Nimbostratus
Oct 16, 2008how to remove port in http request
How do I remove a port within an http request using an iRule? I want to remove port 80 fromtis request
I want change this
https://140.247.200.245:80/xythoswfs/
to this
https://140.247.200.245/xythoswfs/
Thanks
-Tom
- hoolio
Cirrostratus
Hi Tom,when HTTP_REQUEST { log local0. "[IP::client_addr]:[TCP::client_port]: New request to [HTTP::host], [HTTP::uri]" Check if the host contains a colon if {[HTTP::host] contains ":"}{ Replace the Host header with the first field, split on the : HTTP::header replace Host [getfield [HTTP::host] ":" 1] log local0. "[IP::client_addr]:[TCP::client_port]: Updating host to [getfield [HTTP::host] ":" 1]" } }
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