Forum Discussion
Danielseyoum
Jul 26, 2007Altostratus
Case sensitivity challenge
I have application that is case sensitive and I have to make sure the case is formated in a way the application will respond.
incoming uri:
/about us --> should be --> /About Us
/...
Deb_Allen_18
Jul 28, 2007Historic F5 Account
Stream profile will only work against response data, so that won't do the inbound URI re-writing you need. (But hold that thought, you might need to use it to re-write links in the response -- more on that later.)
First, I'd assume that the URI's received by LTM have substituted %20 for the space character.
From there, you could use the following iRule to re-write inbound URI's to the correct case with the internal path:
class URImap {
"about%20us About%20Us"
"corpcomm CorpComm"
"leading%20the%20path Leading%20the%20Path"
}
rule iRule_URI_mapping {
when HTTP_REQUEST {
set OldRootDir [string tolower [getfield [HTTP::uri] "/" 2]]
set NewRootDir [findclass $OldDir1 $::URImap " "]
if {$NewRootDir != ""}{
prepend portal path to requested URI & re-write URI with proper case
HTTP::uri /irj/portal[string map -nocase [list $OldRootDir $NewRootDir] [HTTP::uri]]
}
}
}
Here's a post on a similar topic, a few more complexities but overall similar to yours:http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&forumid=5&postid=13912 (Click here)
Note the details re: stream profile for payload link translation to remove the internal path references (required if your server returns absolute rather than relative links in the response):
-- Source: /irj/portal
-- Target:
and also more logic to re-write redirects containing the internal path to the external presentation.
HTH
/deb
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