Forum Discussion
smiley_dba_1116
Jul 13, 2015Nimbostratus
The Dreaded %20 for space
Does anyone have a idea how to create a iRule that takes into account spaces between words? I have the iRule below and when I enter abc.def.com/en-ca/Teams/Performance Improvement/0700Reports/default...
cjunior
Jul 13, 2015Nacreous
Hi,
What about decode uri? See if it helps you:when HTTP_REQUEST {
log local0. "Host: [HTTP::host] | URI: [HTTP::uri] | DECODE: [URI::decode [HTTP::uri]]"
if { [string tolower [HTTP::host]] contains "abc.def.com" } {
switch -glob [URI::decode [HTTP::uri]] {
"/en-ca/Teams/IT/IM/default.aspx*" {
HTTP::redirect "http://def.ghi.com/IM2/default.aspx"
}
"/en-ca/Teams/Performance Improvement/0700Reports/default.aspx*" {
HTTP::redirect "http://def.ghi.com/PerformanceMeasures/0700Reports/default.aspx"
}
}
}
}
Regards.
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