Forum Discussion
Rick_16795
Jul 27, 2007Historic F5 Account
redirect rewrites
Hello,
I'm working with a customer who's app requires the use of redirect rewrites in the hppt profile. However
the last step of their application sends a redirect that points the customer to a server on a different network and this redirect is being rewritten to use https.
We were thinking a rule such as this may work to turn off the redirect rewrite just on the one
URI.
when HTTP_REQUEST {
if ( [HTTP::uri] starts_with “/f.q.n.d/path/page.htm” ) {
redirect rewrite none
}
}
Does this sound dooable? If not, how would we go about making this happen using an irule?
3 Replies
- Deb_Allen_18Historic F5 AccountActually you can set the value for Rewrite Redirects in the http profile to "Matching" instead of "All", then LTM will only rewrite redirects referencing the hostname originally requested.
- Rick_16795Historic F5 AccountThanks Deb, you rock...
However it didn't work, there's another server involved that takes care of the authentication which posts
to the servers behind the F5 which seems to require the rewrite redirects to be set to all in order to work.
When set to matching authentication fails, when set to all everything works except the logout page which post
out to the servers at the other campus.
Will the iRule I originally sent up work? Or is something that cannot be done with an irule? - Deb_Allen_18Historic F5 AccountYou might be able to swap http profiles for just that one request, but I've never done that so I'm not sure...
I do know for sure that you can selectively re-write server-generated redirects with an iRule.
I would turn off Rewrite Redirects and use an iRule like this to rewrite all but the one to HTTPS:when HTTP_RESPONSE { if { [HTTP::status] starts_with "3"}{ if {[string tolower [HTTP::header Location]] != "http://host/logout.html"}{ HTTP::header replace Location [string map -nocase {http:// https://} [HTTP::header Location]] } } }
/deb
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
