Forum Discussion
Mathew_58740
Nimbostratus
Jul 16, 2010Link redirection
1 Reply
- hoolio
Cirrostratus
Hi Mathew,
In general, you can use HTTP::host to check the requested Host header value, HTTP::uri to get or set the URI and HTTP::redirect to send a 302 redirect or HTTP::respond to send any status code response. Here are the relevant wiki pages which have more info and examples:
http://devcentral.f5.com/wiki/default.aspx/iRules/http__host
http://devcentral.f5.com/wiki/default.aspx/iRules/http__uri
http://devcentral.f5.com/wiki/default.aspx/iRules/http__redirect
http://devcentral.f5.com/wiki/default.aspx/iRules/http__respond
If you want to check the URI for /t24clrwl/servlet/BrowserServlet and redirect the client to /t24modw2/servlet/BrowserServlet, you can use an iRule like this:when HTTP_REEQUEST { if {[HTTP::uri] eq "/t24clrwl/servlet/BrowserServlet"}{ HTTP::redirect "/t24modw2/servlet/BrowserServlet} } }
Aaron
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
