Forum Discussion
networkdawg_303
Nimbostratus
Dec 14, 2016iRules - Remove WWW AND replace "Host"
Hello,
I am sorry if this is very easy to do, but I am really new to F5 and iRules.
We have an iRule in place which replaces the domain part of a URL. This rule is below.
The situation...
Vijay_E
Cirrus
Dec 14, 2016You need this logic inserted into your existing iRule:
if { [HTTP::host] starts_with "www." } {
HTTP::host [getfield [HTTP::host] "www." 2]
}
or you can try this if the above doesn't give the right result:
if { [HTTP::host] starts_with "www." } {
HTTP::host [string range [HTTP::host] 4 end]
}
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