Forum Discussion
ckteur
May 21, 2021Cirrus
Irule or policy to URL rewrite
Hello, I need to rewrite URL with policy but doesn't work; maye will be usefull with an irule but I don't know how mahe it ... My policy: What I want with policy or Irule: ...
spalande
Nacreous
Can you check again? I think you meant translation should be https://other.u.test.com/up/test1/test2
spalande
May 25, 2021Nacreous
There is still confusion around, how uri after /up should be translated. If you can provide more details on it then it would be clear. But I'm assuming those shouldn't be changed. Considering it won't change, you can use below iRule
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
switch -glob [string tolower [HTTP::host]] {
"client.u.test.com" {
if {$uri starts_with "/up" } {
HTTP::header replace "Host" "other.u.test.com"
pool Pool_other.u.test.com_1443
return
}
}
default {
return
}
}
}
If you need any other rewrite rule with uri after /up let me know and we can modify the iRule above
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