Forum Discussion
Gary_Walderich_
Nimbostratus
Apr 25, 2007Masking/Hiding original URL?
I am currently working on configuring a BigIP within an SAP environment, and need to know if I can mask/hide the original URL with a standard URL. Reason, I do not want users to know the entire URL a...
Deb_Allen_18
Apr 25, 2007Historic F5 Account
Right now, to get to the virtual server you have to go to the following: https://users.test.com:50100/irj/portal. What I would like to see is https://users.test.com within the URL.First change the port on the virtual server from port 50100 to 443. That way clients can browse to https://host/uri. Virtual servers by default translate the port to the real ports of the pool members.
Next create and associate a stream profile (Local Traffic/Profiles/Other/Stream) to strip the port/path in any links or references imbedded in the server response, thus presenting to the broswer links of the form https://host/uri where hostname no longer includes the port, and URI no longer contains the portal-specific preamble:
- Source: :50100/irj/portal
- Target:
The stream profile will only replace URLs in the payload, not the headers, so we also need to catch any server-originated redirects and rewrite them. If you didn't need to mask the URI, you could re-write all redirect headers to the correct hostname/port simply by setting "Redirect Rewrite" to "Matching" in the associated http profile. This simple iRule snip will handle both for you instead:
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "3" } {
HTTP::header replace Location [string map {":50100/irj/portal" "" } [HTTP::header Location]]
}
}
And last, you also will need to translate inbound requests to prepend the real portal path to the URI, which is also handled by an iRule:when HTTP_REQUEST {
HTTP::uri "/irj/portal[HTTP::uri]"
}
Put the 2 snips together in 1 iRule and apply to the port 443 virtual server, and you should be set./deb
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects