Forum Discussion
Tim_Cahoon_1608
Nimbostratus
Jul 28, 2016URI Rewrite Help - Rookie
I am trying to do something I think is very simple:
when HTTP_REQUEST {
HTTP::redirect /broker/api/public[HTTP::uri]
}
I want to take an HTTP request coming in and put /broker/api/pubic in ...
Yann_Desmarest_
Nacreous
Jul 28, 2016Hi,
You can do the following :
when HTTP_REQUEST {
if { !([HTTP::path] starts_with "/broker/api/public") } {
HTTP::respond 302 Location "/broker/api/public[HTTP::uri]"
}
}
Tim_Cahoon_1608
Nimbostratus
Jul 28, 2016Thank you Yann. that is doing what I need. One last question, is there a what to not let the client see the rewritten URI? I'd like them to see what they sent, and have the rewritten go to the server only. Any ideas on this?
Once again thank you.
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