Forum Discussion
Pirlo
Nimbostratus
Aug 21, 2009URI Redirect
Usually my research of past posts yield whatever answers I need. But in this case I need a second set of eyes.
HTTP requests will come in as 2 different formats.
1. http://domain.com/application
2. http://domain.com/joeuser
If a request matches "application" i need to ignore it. But the CAVEAT is the redirect I am sending back contains the "application" URI. Logically that means the next HTTP request from that user SHOULD BE IGNORED I THINK
If anything else comes in the URI path, then redirect to URI path and append the end of the redirect with what the original URI request was.
So whether the HTTP URI is /joeuser or /Devcentralrocks - I need it to append that to the end.
And this is my syntax
when HTTP_REQUEST {
if { not ([HTTP::uri] starts_with "/application") } {
HTTP::redirect "https://domain.com/application/jsp/initial/GMCLanding.jsp?id=[HTTP::uri]"
}
}
Am I overcomplicating or thinking to much into this?
- hoolio
Cirrostratus
That looks fine per the description you've provided. Have you tried using it? - Pirlo
Nimbostratus
I am stuck with a application team that has no QA or test environment. - hoolio
Cirrostratus
If you don't have a test environment, you can create a test virtual server which points to the production pool. With a hosts file entry pointing to the test VS address, you can test without affecting the production virtual server.
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