Forum Discussion
gauravarora_370
Nimbostratus
Aug 29, 2018one rewrite url works and another does not.
Hello
I have written an iRule script to rewrite a url based on a condition-
http://intfilings.abc.gov/navigator_icm/?desktop=xyz should rewrite to
http://intfilings.abc.gov/EFiling...
Stanislas_Piro2
Cumulonimbus
Sep 04, 2018try this for logging (irule from Lee with logging request not matching any of 2 conditions)
when HTTP_REQUEST {
if {[HTTP::host] equals "intfilings.abc.gov"} {
if {[HTTP::uri] starts_with "/navigator_icm"} {
log local0. "replacing host header with : server1.ct.gov on URI: [HTTP::uri]"
HTTP::header replace Host "server1.ct.gov"
} elseif {[HTTP::uri] starts_with "/EFilingWeb"} {
log local0. "replacing host header with : server2.ct.gov on URI: [HTTP::uri]"
HTTP::header replace Host "server2.ct.gov"
} else {
log local0. "Unchanged host header on URI: [HTTP::uri]"
}
}
}
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