Forum Discussion
Advice to partial rename uri path
- Jul 23, 2024
That's some very specific stuff you're trying to achieve ..
If the "client URL" you want to display does not exist on the server, I think you'll need two instructions in the iRule, one to redirect client to target URI and one to change this string before it connects to the webserver.
You might try something similar to this
when HTTP_REQUEST { if { [HTTP::host] equals "companyA.com" }{ #I'm using a switch statement so it's easier to add/change uri behavior in the future switch -glob [HTTP::path] { "/" { HTTP::redirect "https://[HTTP::host]/bed/table/r/Home" } "/bed/table/r/Home" { HTTP::path "/room/desktop/r/Home" } } } }
That's some very specific stuff you're trying to achieve ..
If the "client URL" you want to display does not exist on the server, I think you'll need two instructions in the iRule, one to redirect client to target URI and one to change this string before it connects to the webserver.
You might try something similar to this
when HTTP_REQUEST {
if { [HTTP::host] equals "companyA.com" }{
#I'm using a switch statement so it's easier to add/change uri behavior in the future
switch -glob [HTTP::path] {
"/" { HTTP::redirect "https://[HTTP::host]/bed/table/r/Home" }
"/bed/table/r/Home" { HTTP::path "/room/desktop/r/Home" }
}
}
}
Alrighty! Thank you master! Will try this irule now.... Thanks again! :)
Recent Discussions
Related Content
* 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