Forum Discussion
JonathanW_38552
Nimbostratus
Mar 11, 2019Please help with iRule rewrite while keeping original url for external domain
Hello everyone,
Having a tough time finding a correct answer to this. I have seen very similar answers but nothing that does quite what I am asking. I am new to iRules so be kind. I have a client w...
Mar 12, 2019
Hi Jonathan,
You can try creating an FQDN node and pool containing the external website and then using an iRule to replace the HTTP host header while not modifying the URI.
Try this (substitute your own values) and let me know if it works:
create ltm node www.foo.net fqdn { name www.foo.net interval ttl }
create ltm pool POOL-www.foo.net members add { www.foo.net:80 }
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "abc.net" && [string tolower [HTTP::uri]] starts_with "/example" } {
HTTP::header replace host "www.foo.net"
pool POOL-www.foo.net
snat automap
}
}
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