Forum Discussion
Irule Redirect with Datagroup
I have the following Irule and data group working (If I go to jerry.com/jerry it redirects me to http://www.msn.com/en-us/news) What I would like add to the functionality if possible is if I were to go to jerry.com/jerry/123 it redirect me to http://www.msn.com/en-us/news/jerry/123. So I would like it to remember the /jerry/123 and append that to the redirected url. Can anyone tell me if this is possible with the syntax of the irule and datagroup. Below are the contents of my irule and datagroup:
Name: datagroup_uri_list
String: jerry.va.gov/jerry
Value: www.msn.com/en-us/news
Irule is
when HTTP_REQUEST {
if { [class match [HTTP::host][HTTP::uri] equals datagroup_uri_list] } {
set redirect_value [class match -value [HTTP::host][HTTP::uri] eq datagroup_uri_list]
HTTP::respond 302 Location
HTTP::redirect "http://$redirect_value"
}
}
- baboo1970
Altostratus
hi jermc777
I am sure by now you have got your answer for this but if not you can look at this
https://devcentral.f5.com/s/question/0D51T00006zve4ISAQ/irule-datagroup-redirect?tab=My+Questions&page=1
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