Forum Discussion
jrosales2000_10
Apr 29, 2011Nimbostratus
What did i do wrong with this irule for redirection based on url
Hi, i am trying to accomplish the following (we are running LTM 1600's version 9.4.6):
If a user enters url: oem1.website.com they are routed to oem1.website.com/oem1/vin.aspx
If a...
Michael_Yates
May 11, 2011Nimbostratus
Try this modification with some logging enabled and let us know what the results are.
This should log the incoming [HTTP::host] and [HTTP::uri] at the beginning of the iRule so that you know what it starts with. From there you should know if it qualifies for the first if statement.
The second is just prior to the [HTTP::uri] compare.
when HTTP_REQUEST {
log local0. "Incoming URL - HOST:[HTTP::host] URI:[HTTP::uri]
Check if the request is for the root document
if {[HTTP::path] eq "/" } {
switch [string tolower [HTTP::host]] {
"devsmk.landrover.ourwebsite.com" { HTTP::uri "/landrover/vin.aspx" }
"devsmk.jaguar.ourwebsit.com" { HTTP::uri "/jag/vin.aspx" }
}
}
switch -glob [ string tolower [HTTP::uri]] {
log local0. "URI Compare - URI:[HTTP::uri]"
"/jag*" { pool pool.containing.jag.files }
}
}
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