Forum Discussion
AK_164512
Nimbostratus
May 15, 2016rewrite iRule
I'm trying to write an iRule that will redirect users from one URI to another.
Users will connect via an external facing URL and then F5 needs to rewrite it to a different URL and send it to the...
Hannes_Rapp
Nimbostratus
May 15, 2016Hey,
This rule will retain original request URI, but replace Host. There's no need for iRule to cover the rest of what you asked for. You cover the delivery to Default Pool by setting a Default Pool in VS config. You cover the delivery to plain HTTP port by setting TCP/80 port in Pool Member config.
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] eq "ddd.com") && ([HTTP::uri] starts_with "/Ecf") }{
HTTP::header replace Host "ccc.com"
}
}
Regards,
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