Forum Discussion
Sam10 Altostratus
Altostratus
Jul 23, 2020url redirect irule
 I am trying to get an irule working for redirecting a url to a different one.       When users connect *.host1.abc.com  it needs to redirect to *.host2.xyz.com       when HTTP_REQUEST {    if { [clas...
Sam10 Altostratus
Altostratus
Jul 28, 2020thankyou , finally got this working as expected.
- when HTTP_REQUEST {
- if { [string tolower [HTTP::host]] contains "host1.abc.com" } {
- set host [string map -nocase {"host1.abc.com" "host2.xyz.com"} [HTTP::host]]
- HTTP::redirect "http://$host[HTTP::uri]"
- }
- }
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