Forum Discussion
URL Browser Mask/Hide with redirect
Hi mj16othman,
as you already mentioned: Rewriting HTTP requests/responses and/or HTTP response payload becoming tricky, depending where the internal URLs are embedded. You can easily spend dozends of hours to figure out (slightly broken) application logic and rewrite HTTP request/responses as needed using LTM Policies or iRules.
Before you get angry or mad you may try two things:
1.) Contact the vendor/developer of the Web application and ask them: a.) If the web application can be adjusted to that it does not care which HOST-Name was used when accessing it? And b.) If site-internal redirects or internal URL references can be switched to "relative" URLs (aka. href="/somepath" instead of href="prot://hostname:port/somepath"). This is probably the best approach to solve your problem, since the web application itself would fix thier own issues.
2.) Try to use LTMs rewrite profiles to translate external/internal URIs. Compared to iRule based solutions, those rewrite profiles are easy to setup and may already solve your issues. You may still need to add some iRule code for edge cases where the rewrite profile was unable to translate. But lets see first...
Below is a LTM config you can use as starting point...
ltm profile rewrite HTTP_Rewrite_Forex {
app-service none
bypass-list none
client-caching-type cache-css-js
defaults-from rewrite
java-ca-file ca-bundle.crt
java-crl none
java-sign-key default.key
java-sign-key-passphrase-encrypted none
java-signer default.crt
location-specific false
request {
insert-xforwarded-for enabled
insert-xforwarded-host disabled
insert-xforwarded-proto disabled
rewrite-headers enabled
}
response {
rewrite-content enabled
rewrite-headers enabled
}
rewrite-list none
rewrite-mode uri-translation
split-tunneling false
uri-rules {
uri_1670420647794 {
client {
host forex.mycomp.com
path /
scheme https
}
server {
host sap10.company.comany.de
path /
port 8445
scheme https
}
}
}
}
ltm profile html HTML_Rewrite_Forex {
app-service none
content-detection enabled
content-selection { text/html text/xhtml }
defaults-from html
description none
}
Import/Rebuild the profiles into your config, then select both profiles on the VS hosting the Ferox application.
HTH and Cheers, Kai
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com