Forum Discussion
rhpatrick_12082
Nimbostratus
Apr 08, 2013HTTP::redirect challenges with Maven requests
Hi,
I am a newbie and am struggling with a problem that is likely very simple so I appreciate your patience with me.
We are trying to configure a rule to redirect https requests from...
Kevin_Stewart
Employee
Apr 08, 2013How about something like this:
when HTTP_REQUEST {
set host "https://machine1.mycompany.com"
if { [string tolower [HTTP::uri]] starts_with $host } {
Host is in URI
set uri [string range [HTTP::uri] [string length $host] end]
HTTP::respond 302 Location "https://machine2.mycompany.com$uri"
} else {
HTTP::redirect "https://machine2.mycompany.com/content/secure/maven[HTTP::uri]
}
}
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