Forum Discussion
dcam_21053
Nimbostratus
Sep 17, 2012URL Redirect Not Working
I am not sure why, but can someone look at this redirect irule and tell me what I am doing wrong. It is a seemingly simple thing. I am seeing that the irule is being hit, no errors, and the VIP is being hit of course, but there is no redirect happening. It keeps sending me to the original site.
when HTTP_REQUEST {
if { [HTTP::uri] equals "site/care/ccso" } {
HTTP::uri "http://site/sites/ccsops/"
}
}
6 Replies
Sort By
- Kevin_Stewart
Employee
a URI will always starts with "/". Also assuming "site" is you host name. So:when HTTP_REQUEST { if { [HTTP::uri] equals "/care/ccso" } { HTTP::uri "/sites/ccsops" } }
- dcam_21053
Nimbostratus
I tried it the way you suggested and it still not doing a redirect. - Kevin_Stewart
Employee
Okay, do this:when HTTP_REQUEST { log local0. "URI = [HTTP::uri]" if { [HTTP::uri] starts_with "/care/ccso" } { HTTP::uri "/sites/ccsops/" } }
- dcam_21053
Nimbostratus
I would like the browser to explicitly redirect to the new URI.... - dcam_21053
Nimbostratus
Thank you, with your help I was able to get it to work...it is now redirecting properly. I ended up using the operator "contains" - scottwilliem_12
Nimbostratus
Want some more details about this is not working if we putted it properly....
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