Forum Discussion
Jure_48098
Nimbostratus
17 years agoSSL login redirect
I have a site that I'm tryng to migrate to LTM, that is running HTTP and HTTPS. The login POST always goes to the SSL server. Server then does the auhorisation and returns a HTTP 302 redirect with the...
hoolio
Cirrostratus
17 years agoIf you only want to rewrite some responses, based on request criteria, you could add logic to the HTTP_REQUEST event:
when HTTP_REQUEST {
if {[HTTP::method] eq "POST" and [HTTP::header value Referer] starts_with "https://"}{
set rewrite_redirect 1
} else {
set rewrite_redirect 1
}
}
when HTTP_RESPONSE {
if {[HTTP::is_redirect]}{
HTTP::header replace Location [string map "[IP::remote_addr]:[TCP::remote_port] host.example.com" [HTTP::header value Location]]
}
}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