Forum Discussion
Aug 02, 2013
sample irule for redirect / rewrite
BIG-IP VE (Virtual Edition) v10.2.4 ( build 577.0 )
Could someone please provide or point me to an irule that performs redirects / rewrites , including the match class and associated data-file. ...
Kevin_Stewart
Employee
Aug 03, 2013Well, in a redirect iRule, and especially the one above, the client (browser) would change the host header for you. In fact the host header might only ever need to be changed en route to the server if the server expects (and requires) a different host header than what the client is providing. It's a little difficult to give you any sort of solid example without knowing what you're trying to achieve. In any case, think of a data group as a set of key-value pairs, where the key is usually something the client is providing (host name, URI part, cookie, anything really), and the value is what you want to translate that to. The above example took the request URI and translated that into a host name for a physical (302) redirect. It could as easily have been a translation to a different URI, both explicitly through a redirect, or by simply changing the URI (or part of it) in line, without the user's knowledge.
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