Thanks Leonorodo for helping me. For some reason these irule are not working as expected while executing the traffic flow:
==============================irule 2========To replace the URI to the server
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] starts_with "/resource1"}{
set newuri [string map -nocase {"/provision" "resource2"}[HTTP::uri]]
HTTP::uri $newuri
pool POOL1
}
}
====================================
===============irule 3================To redirect back to the client with an new URI value for further communications
===================================
when HTTP_REQUEST {
set NEW_URI "/resource2"
switch -glob [string tolower [HTTP::uri]] {
"/resource1" {
HTTP::redirect 301 "https://[HTTP::host]$NEW_URI"
}
}
}
=========================================
Could you please help me to fix the issue?
Regards,
Thiyagu