Forum Discussion
Maynor_Ovalle
Nimbostratus
May 02, 2007How do I rewrite a private dns redirect to a public available dns since the app is being accessed externally
I'm very new at writting iRules but would love some assistance or tips on how we can accomplish the following.
We basically have a web application that is making internal url redirects on a public assessible web site. What we need to do is to be able to catch that redirect on an HTTP_RESPONSE and rewrite it with the public accessible url but still keep the HTTP::uri header untouched. There seems to be some limitation where you can not use HTTP::uri header call on an HTTP_RESPONSE. Any ideas on how we can accomplish this? Thanks for your assistance. Below is an example of what we thought would work.
when HTTP_RESPONSE {
if { [HTTP::host] contains "internalurl.com"} {
HTTP::redirect "publiurl.com" ":" 1][HTTP::uri]
}
}
- Kirk_Bauer_1018
Nimbostratus
This ProxyPass iRule is made to handle this kind of thing: - Deb_Allen_18Historic F5 AccountNot to negate Kirk's suggestion, but I'm always a fan of the simplest solution possible, so I'll just point out that many customers facing this dilemma can probably get away with using a couple of built-in features instead of an iRule.
which will perform a single pass replacement looking for the first value in each pair, replacing with the 2nd.source: target: @node1.domain.com@vs.domain.com@ @node2.domain.com@vs.domain.com@ @node3.domain.com@vs.domain.com@@
- Maynor_Ovalle
Nimbostratus
I will be trying out the easy solution first. Thanks for your imput I'll post the solution just as reference.
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