Forum Discussion
lipos_54863
Nimbostratus
Mar 26, 2012Secret HTTP redirection
Hi,
I need to hide HTTP redirection on LTMs using an iRule.
Here's my simple example:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/test"} {
HTTP::redirect "http://xx.xx.xx.xx/test"
log local0. "Enabling redirection for HTTP: [HTTP::host][HTTP::uri]"
}
}
In an effect I don't wan't to see http://xx.xx.xx.xx/test in my address but I want to cover it with a domain that this request was forwarded to originariginally.
In summary:
1. I'm sending request to VIP of test.com - it's being forwarded to the POOL. My broswers shows that I'm browsing tes.com. All as usual.
2. I'm sending request to VIP of test.com/test - it's being forwarded to on IP not behind the F5s. My broswers shows that I'm browsing test.com/public
I can't use "node" ot "pool" because these IP in not behind the F5s but rather in the Internet.
Can someone give me any idea or example of code that does it?
Maybe there's a function of iRule that takes care of it?
Let me know what you think!
M
4 Replies
Sort By
- Brian_69413
Nimbostratus
You can change a users path so that the server gets a different request than the user originally sent, but this only works for servers behind your LTM...a redirect is just that, a redirection. I don't know of any way to do this. - hoolio
Cirrostratus
You can load balance to anything that LTM can route to. If you can use static IP address(es) for the external content you can use a pool. Just SNAT the traffic and create a route. If you need to resolve a hostname to an IP address, you can use the RESOLV::lookup command to resolve the hostname and the node command to select it as the destination IP. - lipos_54863
Nimbostratus
Posted By Brian on 03/26/2012 07:39 AM - lipos_54863
Nimbostratus
Posted By hoolio on 03/26/2012 07:48 AM
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