Forum Discussion
C_D_18583
Nimbostratus
Nov 20, 2006Replacing in the URI ; http -> https and port 80 -> 443
What is the easiest way to rewrite the following string? Replacing in the URI http -> https and port 80 -> 443
Before:
https://testlab-d.tdx.dorion.com/amserver/UI/Login?go...
Julien_Virag_48
Nimbostratus
Dec 03, 2006Hi Steve,
This is the rule I use successfully to detect a string in the URI & then replace it with another string. This sounds like waht you are trying to do.
when HTTP_REQUEST {
if { [HTTP::uri] contains "/oma"} {
HTTP::redirect "https://[HTTP::host]/oma"}
else {
HTTP::redirect "https://[HTTP::host]/exchange"
}
}
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