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 don't the /bmi to show in the address bar.
Is this possible? How can I do this using BigIP?
Kind Regards
Kate
- hoolio
Cirrostratus
Hi,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]" } }
- Kate_Kattar_107
Nimbostratus
Thanks Aaron. I have attempted to paste the code below into a new irule. I get the msg: - JRahm
Admin
Just a typo, that line should look like thisif {not ([HTTP::uri] starts_with "/bmi")}{
- Kate_Kattar_107
Nimbostratus
Thanks Guys, its works perfectly. Much appreciated. - Colin_Walker_12Historic F5 AccountThat will, of course, come back with the Location header including the /bmi in the URL. If you're okay with that, then this will work as-is. If not, you'll need to add some Response logic to re-write the Location header on egress and make this a two-way re-write.
- Kate_Kattar_107
Nimbostratus
I have this working on two VIPs, but have moved it to a third VIP that has SNAT turned on. It doesn't work. The SNAT is the only thing about the VIP setup that is different. Any ideas? - hoolio
Cirrostratus
Source address translation shouldn't affect the HTTP headers or content. I'm guessing the other difference is the application.
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