Below is what I have in 1 irule. Fails because the backend server is expecting---https://ServerName.Domain.com:8443/etc/bc/ui5_ui5/ui2/ushell/shells/abap/something.html"
But I want the client browser to have the below once the server completes its jobs post request.
https://FQDN/etc/bc/ui5_ui5/ui2/ushell/shells/abap/something.html
Hope this makes sense.
when HTTP_REQUEST {
# Check if requested host doesn't start with www.example.com
if {not ([string tolower [HTTP::host]] starts_with "https://FQDN/")}{
# Replace the host header value with newhost.example.com
HTTP::header replace Host "https://ServerName.Domain.com:8443/"
if { [HTTP::uri] starts_with "/" } {
set uri [string map -nocase {"/" "/etc/bc/ui5_ui5/ui2/ushell/shells/abap/something.html"} [HTTP::uri]]
HTTP::uri $uri
}
}
}