Forum Discussion
Snowman_108161
Nimbostratus
Aug 03, 2012Looking to separate out URL from URI
Does anyone have some advice on how to pull out just the URL from a full URI? I've attempted to use HTTP::path but that pulls out both the URL and URN. An example may help to illustrate this. ...
Richard__Harlan
Aug 03, 2012Historic F5 Account
Use HTTP::uri it does what you are looking for
https://devcentral.f5.com/wiki/iRules.HTTP__uri.ashx
then setup a switch statement
switch [HTTP::uri] {
"/abc/user" {
use pool * }
"/abc/" {
use pool * }
default {
HTTP::redirect "http://server1.corp.com/abc/user"
}
}
That should work for you
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
