Forum Discussion
dkinsler_23191
Dec 10, 2010Nimbostratus
problem 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...
hooleylist
Dec 10, 2010Cirrostratus
You 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
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