Forum Discussion
cathy_123
Cirrostratus
Nov 07, 2017F5 redirection not working
Hi Guys,
Can you help me with this we are using redirection for a long time now. However not sure what is the issue on my irule.
When the user enters it will be redirected to http://www.abc.com/s?rch=&q=qrs+tuv
below is my irule
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] contains "www.abc.com"} {
if {[string tolower [HTTP::uri]] starts_with "/n/abc-def,-ghi-jkl/mno-2061"} {
HTTP::redirect "http://www.abc.com/s?rch=&q=qrs+tuv"
}
}
}
Not sure why it is not working probably because of long uri? Please help
- Snl
Cirrostratus
Try this
when HTTP_REQUEST { if { ([string tolower [HTTP::host]] contains "www.abc.com") and ([string tolower [HTTP::uri]] starts_with "/n/abc-def,-ghi-jkl/mno-2061") } { HTTP::redirect "http://www.abc.com/s?rch=&q=qrs+tuv" } }
- JG
Cumulonimbus
The problem might be the
in the URI. It is a reserved word of the HTTP protocol. Are you sure it is indeed part of your URI as shown here? If it is not used as param separator, it should come in encoded as,
.%2C
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