Forum Discussion
john_miller_440
Nimbostratus
Nov 09, 2006simple irule for redirection
hello everyone,
I am trying to take a request from some port just add a "default" url to it. the virtual server is http://1.1.1.1:80
any requests to that address should go to http:2.2....
hoolio
Cirrostratus
Nov 09, 2006You can use HTTP::uri to view or modify the URI before the request is sent to the node.
Here is one example:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" }{
HTTP::uri "/app/index.html"
}
}This rule with trigger when a client makes an HTTP request. If the client requested the root document (/), the rule would rewrite the URI of the request to /app/index.html. The VIP's load balancing algorithm would handle the node selection so you don't have to worry about it within your rule.
If you want more info on the HTTP::uri options try checking the wiki (Click here)or search the forum for URI rewrite.
HTH,
Aaron
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