Forum Discussion
Osiolek_69514
Nimbostratus
Aug 01, 2010Is something like that do-able?
Hi all,
I have three DNS records:
a.x.com --> 1.1.1.1
b.x.com --> (alias) --> a.x.com
c.x.com --> 2.2.2.2
As you can see both a.x.com and b.x.com point to the same V...
hoolio
Cirrostratus
Aug 03, 2010You can resolve a host name to an IP address using NAME::lookup in 9.x or RESOLV::lookup in 10.1 and higher.
http://devcentral.f5.com/wiki/default.aspx/iRules/name__lookup
http://devcentral.f5.com/wiki/default.aspx/iRules/resolv__lookup
There's an example using NAME::lookup in the Codeshare:
http://devcentral.f5.com/wiki/default.aspx/iRules/DestinationSnatUsingDNS.html
If you want to rewrite the hostname and/or URI, you could use "HTTP::header replace Host $new_host" and/or "HTTP::uri $new_uri"
You can check the ProxyPass iRule for a very comprehensive example of this:
http://devcentral.f5.com/wiki/default.aspx/iRules/proxypass
Aaron
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