Hi,
I think that you application owner use absolute paths, absolute paths always include the domain name of the website.
He should have used Relative path.
For more information: https://www.coffeecup.com/help/articles/absolute-vs-relative-pathslinks/
You can solve this behavior, for this you have to rewrite header response and contente response (Body).
Devcentral already addressing the subject, you can use this irule:
https://devcentral.f5.com/questions/hostname-rewrite
I adapt the rule for you, let me know if you need more details. don't forget to change hostname (internal external)
when HTTP_REQUEST {
set external_hostname "aaa.company.com"
set internal_hostname "bbb.company.net"
Enable debug logging to /var/log/ltm. 1 = yes, 0 = no
set hostname_rewrite_debug 0
if {$hostname_rewrite_debug}{log local0. "Original URL: [HTTP::host][HTTP::uri]"}
HTTP::header replace "Host" $internal_hostname
if {$hostname_rewrite_debug}{log local0. "New URL: [HTTP::host][HTTP::uri]"}
}
when HTTP_RESPONSE {
if { [HTTP::header value "Location"] starts_with "$internal_hostname" }{
if {$hostname_rewrite_debug}{log local0. "Inside of HTTP::header location, orig HTTP location equals: [HTTP::header location]"}
set location [HTTP::header location]
HTTP::header replace location $external_hostname
if {$hostname_rewrite_debug}{log local0. "Inside of HTTP::header location, new HTTP location equals: [HTTP::header location]"}
}
}
But more simple for you is to use a rewrite profile. It work fine for me and it simple to maintain.