Forum Discussion
agidwani_102403
Nimbostratus
Feb 21, 2008Need help
hello,
I need to accomplish the following
rewrite the uri https://aa.mycompany.com/compA/blah.acmx (can have companyA, Company123, CompanyABC etc)
rewrite the uri to htt...
Nicolas_Menant
Employee
Feb 21, 2008Hi,
you can create a data group with all the URI to replace and then do something like this.
Let's say your datagroup's name is uri_to_replace (in this case you'll need to use only lowercase caracters in the datagroup i.e the string tolower)
when HTTP_REQUEST {
if {[matchclass [string tolower [HTTP::uri]] contains $::uri_to_replace] } {
Do here your URI update here
}
}
the second option is to use something like this:
when HTTP_REQUEST {
HTTP::uri [string map {find replace} [HTTP::uri]
}
}
I tend to prefer the first one since then it's easier to maintain.
Recent Discussions
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
