Forum Discussion
Glenn_Ruffus_10
Nimbostratus
Sep 26, 2006iRule for specific HTTP redirect
I would appreciate help in writing a simple iRule that will look for traffic coming in on some virtual servers that contains a specific URL/URI and will then redirect the browser to go to a slightly different but specific URL/URI. For instance:
if the HTTP request is for "fredflintstone.com/a/b/c/d/default.asp"
then redirect the browser to use "http://www.fredflintstone.com/a/b/c/d/default.asp"
I have something written and it's probably close but I would really appreciate an expert's suggestion to compare it with.
Thanks.
Glenn
- hoolio
Cirrostratus
Hi Glenn,when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "fredflintstone.com" and [HTTP::uri] equals "/a/b/c/d/default.asp" } HTTP::redirect "http://www.fredflintstone.com/a/b/c/d/default.asp" } else { pool http_pool } }
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