Forum Discussion
Abed_AL-R_26070
Nimbostratus
Jul 12, 2018URI rewrite
Hello
We're trying to rewrite a specific word in URI
we're using this irule:
"/lms/sso*" -
"/lms/rest/ext/oauth2/token*" {
pool PLMS_Pool
HTTP::path "/lmsserver"
log local0. "setting Path to [HTTP::path] selecting pool PLMS_Pool"
The problem is that this irule is rewriting the whole URI. for example : from to
But we need the URI to be rewritten this way:
how can we do that ?
- Andy_McGrath
Cumulonimbus
"/lms/sso*" - "/lms/rest/ext/oauth2/token*" { pool PLMS_Pool set newPath "[string map {"/lms" "/lmsserver"} [HTTP::path]]" HTTP::path $newPath log local0. "setting Path to [HTTP::path] selecting pool PLMS_Pool"
- Lee_Sutcliffe
Nacreous
Hi, you can do this by using these commands:
"/lms/sso*" - "/lms/rest/ext/oauth2/token*" { pool PLMS_Pool set newPath [string map {"/lms" "/lmsserver"} [HTTP::path]] HTTP::path $newPath log local0. "setting Path to [HTTP::path] selecting pool PLMS_Pool"
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