Forum Discussion
URL Rewrite in LTM Policy
Hello, this is the most basic I can come up with assuming that finnish language append is optional.
- I've wrote this on mobile, there might be typos, lmk
when HTTP_REQUEST {
set lan ""
if {[HTTP::uri] ends_with "?language=en"}{
set lan "?language=en"
} elseif {[HTTP::host] eq "swedishapp.domain.com" }{set lan "?language=sve"}
HTTP::header replace "Host" "192.0.2.10"
HTTP::uri "/appname/$lan"
}
- CA_ValliMar 13, 2022
MVP
Reading request again I noticed you mentioned you have an ltm policy for host rewrite, eventually remove the http header instruction as it might clash with ltm policy statements
(try not to have conflicts on instructions as is might result in unexpected behavior)
also if finnish language is required you can change the default $lan value from "" to "?language=fin" at variable set instruction time,
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