Forum Discussion
Craig_17655
Nimbostratus
Aug 14, 2009iRule for Redirrecting based upon URI
I am trying to replace some apache functionality using iRules. I have the following rules set up in apache:
SetHandler matrix
SetCluster imgser...
Craig_17655
Nimbostratus
Nov 03, 2009Through support from F5 I found that I should use HTTP:path instead of HTTP:uri
This is why:
The issue is that the HTTP:uri command begins parsing with the slash after the hostname, then grabs the path, then the query.
From DevCentral:
HTTP::uri
* Returns the URI of the request. It does not include the protocol (http or https) or hostname, just the path and query string, starting with the slash after the hostname.
http://devcentral.f5.com/Wiki/default.aspx/iRules/HTTP__uri.html
Based on your example URL, "HTTP:uri" will return the entire line, as everything that follows the "?" character represents the query.
Try this instead:
HTTP::path
"Returns or sets the path part of the HTTP request. The path is defined as the path and filename in a request. It does not include the query string."
http://devcentral.f5.com/Wiki/default.aspx/iRules/HTTP__path.html
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