Forum Discussion
dkinsler_23191
Nimbostratus
Dec 10, 2010problem with HTTP::redirect
Hi all, I am trying to do a redirect but I am getting a strange result. My code looks like this....
when HTTP_REQUEST {
if { ([HTTP::host] equals "abc.com") and ([HTTP::uri] equa...
hoolio
Cirrostratus
Dec 10, 2010You need to specify a fully qualified URL in redirects in this situation. Else, the browser interprets the Location in the redirects as local and appends it to the current host. Can you try this?
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"abc.com" -
"www.abc.com" {
Request to abc.com or www.abc.com. Check for URI of /enroll
if {[HTTP::uri] equals "/enroll"}{
HTTP::redirect "http://www.xyz.com/test/enrollment/home.aspx"
}
}
}
}
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
