Forum Discussion
redirecting for url/uri to url/uri
Hi, I have a question regarding redirecting and I am not sure if it is supported on the bigIP. I am trying to send a request from a user to the eg site http://lions.dev.tmp.com/bids, so that if the user types http://lions.dev.tmp.com/bids , this user will be sent or redirected to http://tigers.dev.tmp.com/bids, is this possible. I tried multiple combinations and came up with the following but it does not account for the domain/uri, really need assistance with this. when I type http://lions.dev.tmp.com i get redirected to http://tigers.dev.tmp.com, but I want to be able to type http://lions.dev.tmp.com/bids and get redirected to http://tigers.dev.tmp.com/bids (is this possible on the bigip)
when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { set newuri "/bids" HTTP::redirect http://tigers.dev.tmp.com/bids } }
4 Replies
- Cory_50405
Noctilucent
Possible indeed:
when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals "lions.dev.tmp.com" and [string tolower [HTTP::uri]] equals "/bids" } { HTTP::redirect "https://tigers.dev.tmp.com/bids" } }- Shlairshe_84486
Nimbostratus
I will try it and let you know, but thanks , will let you know shortly. - Shlairshe_84486
Nimbostratus
Thank cory it worked perfectly, really helped out - Cory_50405
Noctilucent
Glad to hear.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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