Forum Discussion
Micka_61352
Jul 21, 2011Nimbostratus
Redirect traffic to root directory on server pool
Hi there,
Wondering if anyone can help. Will this iRule work. I want to be able to look at URL straing for data and send it to specific pool listening on port 81 once it hits t...
Michael_Yates
Aug 24, 2011Nimbostratus
This iRule will remove the "/data" from your URI, but it will not replace the target document.
So if your URL was:
http://www.website.com/data/default.html
This iRule should mask the "/data" from being sent to the server:
Client Browser should show: http://www.website.com/data/default.html
Request send to the Server will be: http://www.website.com/default.html
If you need to modify the target document then you will want to make adjustments to this iRule.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/data/*" {
HTTP::uri [string map {"/data" ""} [string tolower [HTTP::uri]]]
pool IESDWEB_HTTP_81
}
default {
pool IESDWEB_HTTP
}
}
}
Hope this helps, but if it is not let us know what behavior you still need adjusted.
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