Forum Discussion
MeAndMyBIGIP_60
Nimbostratus
Sep 02, 2009Nesting a redirect to another pool?
So I have an existing HTTP > HTTPS redirect rule running fine that's running on Pool1:
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
I have another, Po...
Sep 04, 2009
Ok, let's take a step back. You are just changing the URI with the HTTP::uri as it's presented to the backend server. This is not the same as a full HTTP::redirect that sends the response back to the browser with a new URL to request and thus changes the address bar.
I'm still a bit confused at what you want to do. I'm not sure if you want to map "/bar" in the URI to nothing but only if it's just "/bar" and not "/bar/index.html" or something like that. If you could give us a list of input's and outputs it will be easier to come up with a working solution for you.
ie.
http://www.foo.com/bar -> http://www.foo.com/
http://www.foo.com/bar/index.html -> http://www.foo.com/index.html
http://www.foo.com/foobar -> http://www.foo.com/foobar
http://anything -> https://anything
Also, we need to know whether you want full redirects or just want to trick the backend server into "thinking" the direct was from the new URI. This will determine whether we issue a HTTP::redirect or just manipulate the HTTP::uri.
Also, If you want to include the http->https iRule, you'll likely want to set a priority on them to make sure they are executed in the order you expect. If you don't have SSL termination and the URI mapping iRule running on the SSL virtual, then that iRule won't execute if the http->https redirect is processed first. See the documentation on "priority" for details on how to use it:
http://devcentral.f5.com/wiki/Default.aspx/iRules.priority
Click here
Hope this helps...
-Joe
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