Please note the URL content after /widgets will change based on type of request but the logic of rewriting should be same. that is to copy everything after /widgets and append additional url parameters.
It can be hosted any where. You would need to modify the iRule above to create a pool for “sample.com” and use it with pool command before return statement.
The iRule is doing his job, by re-writing exactly, how we wanted. However, the page is not loading automatically (or using the incoming URL). When we try manually with a new URL (Enabled log, so I was able to get the new URI) in the browser it is loading. The pool is also reachable from LTM.
you would need to capture tcpdump, enable logging in iRule to capture request and response and also review devolper tool logs from the browser to see what’s happening.