Forum Discussion
Bob_10976
Nimbostratus
Jun 07, 2012Odd WWW Redirect and Uppercase issue..
Hello all, I've got an odd issue with one redirect not working and it seems because the URI has uppercase in it.I have a couple of redirect in place which is below but the problem is if I go to http...
Michael_Yates
Nimbostratus
Jun 07, 2012Hi Bob,
From what you are describing it should work properly. Thing that I can notice from what you have provided is that your "www.mydomain.com" is not enclosed in "".
Try something like this:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"www.mydomain.com" {
if { [string tolower [HTTP::uri]] ends_with "/portal/orglist.aspx" } {
log local0. "Qualified Match: [HTTP::uri]"
HTTP::respond 301 Location "http://www.google.com"
}
}
}
}
These were my logged results:
Jun 7 13:29:06 local/tmm info tmm[30731]: Rule Z.iRule.Development : Qualified Match: /Portal/ORGList.aspx
Hope this helps.
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