Forum Discussion
Gravanda_33760
Nimbostratus
Feb 18, 2009Beginner - rewrite and redirect URI question
I need to create an iRule to do a few things:
1. redirect incoming HTTPS requests to a specific URI
2. rewrite the URL to the virtual server
I have a VS that has 4...
AndrewO_4840
Nimbostratus
Feb 19, 2009I think you're confusing the issue somewhat by your request:
> c. The user sees a redirect in the browser to be https://somesite.com/something ad NOT the real server in the pool on a different port.
Unless you really screw things up, the user would NEVER see the real server in the URL. In fact, you'd have to go a long way out of your way to make that happen.
Here's a stab at what I think you're after:
when HTTP_REQUEST {
if { ![HTTP::uri] starts_with "/something" } {
HTTP::uri "/something/[HTTP::uri]"
}
}
This basically says that if the URI does not begin with "/something", prepend /something to the URI before passing it onto the server. This is transparent to the client. The client never sees /something,
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