Forum Discussion
RSpangler_17032
Nimbostratus
Mar 06, 2017Remove ports from URL's
Hello,
I have the following iRule and it works as expected;
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"www.company.com" { pool company.com_www }
"www2.company.co...
jaikumar_f5
Noctilucent
Mar 06, 2017When you are using [HTTP::host] as the syntax, it captures Host header which also includes domain & service. You may want to like this,
when HTTP_REQUEST {
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]
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