Forum Discussion
Thomas_Uczekaj_
Nimbostratus
Jun 08, 2006Can you hide a URI change from client
Here is the sample Irule:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/"} {
HTTP::uri /stuff }
}
It does this:
client submits: http://host.testing.com
client receives: http://host.testing.com/stuff/index.htm
This is what we want it to do:
client submits: http://host.testing.com
client receives: http://host.testing.com/index.htm
Anyone have an idea how to do that (hide the change in the URI)?
Tom
- Thomas_Uczekaj_
Nimbostratus
What I'm looking for is the ability to change the URI on the Response, however, HTTP::uri only works on HTTP_REQUEST not for HTTP_RESPONSE - Deb_Allen_18Historic F5 Account
- bl0ndie_127134Historic F5 AccountIf you are using 9.2 or later version, the use of HTTP::payload should be depricated in favor of the stream profile which is more powerful and much more efficient. Read all about it here Click here
- Deb_Allen_18Historic F5 AccountSupport recently informed me of a known issue with the stream profile: The stream profile apparently does not update the Content-Length to the new size of the resulting content.
- Colin_Walker_12Historic F5 AccountI don't believe uczekajt is looking for content re-writing, just URI re-writing from the client's perspective.
when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { HTTP::uri "/stuff" } } when HTTP_RESPONSE { if { [HTTP::header location] contains "/stuff" } { set newLoc [string map {/stuff /} [HTTP::header location] ] HTTP::header replace location "$newLoc" } }
- Deb_Allen_18Historic F5 Accountsorry, I forgot there was a cross-post. Issue further discussed & resolved here:
- Deb_Allen_18Historic F5 AccountAlso, apparently the workaround for the Content-Length update issue with the stream profile is to enable response chunking to rechunk in the http profile.
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