Understood, but is it JUST the host name that needs to changed?
http://xxx.com:8008 to https://xxx.com
Or does the URI path also have to change?
http://xxx.com:8008/yyyy/rrr to https://xxx.com
If the former, then the Location header replacement code above should work for redirects.
HTTP::header replace Location [string map {"http://xxx.com:8008" "https://xxx.com"} [HTTP::header Location]]
If the latter, then the solution is a bit more complex. Also, if the offending URL is buried in the payload anywhere, perhaps as references to document objects,
src=http://xxx.com:8008/images/my_cat.png
then you'll also want a STREAM profile to rewrite these links in the response traffic. Again though, if it's just the host name that has to be changed, the iRule can be fairly simple. If you need to alter URI paths, that gets a bit trickier and starts getting into the realm of things like the ProxyPass iRule or Rewrite profiles in 11.5.
Perhaps the best first thing to do is to analyze a client side capture with a tool like Fiddler or HTTPWatch. Look at the URLs that the browser is trying to access and potentially breaking on and see where those addresses are coming from.