Forum Discussion
Kate_Kattar_107
Nimbostratus
Jul 14, 2008Cloaking part of a URI
Hello,
We would like to cloak part of the uri using an irule. We want users to go to http://website.ghg.co.uk - the irule should take them to http://website.ghg.co.uk/bmi although we d...
hoolio
Cirrostratus
Jul 14, 2008Hi,
You can rewrite the URI before the request is sent to the pool of web servers:
when HTTP_REQUEST {
Check if the URI doesn't start with /bmi
if {not ([HTTP::uri] starts_with "/bmi")}{
Prepend /bmi
HTTP::uri "/bmi[HTTP::uri]"
}
}
This won't affect any redirects or absolute references in the page content. If you need to modify the response headers you can use HTTP::header in the HTTP_RESPONSE event or for the response body, you can use a stream profile. I'd try using the above example first and see if it works though.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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