Forum Discussion
Jean_42123
Nimbostratus
May 11, 2010iRule - HTTP Request Redirection - HELP
Hi Guys,
I am really frustrated and i would like your help to complete the below script.
The target of the script is to check a list of URI. In case of any match with the list, we would like to re...
Michael_Yates
Nimbostratus
May 11, 2010Hi Jean,
If you had a URL: http://www.website.com/subdirectory/index.html
[HTTP::host] is the first portion of your URL - www.website.com
[HTTP::uri] is everything trailing (including the "/") - /subdirectory/index.html
Wiki Pages:
HOST: http://devcentral.f5.com/Wiki/default.aspx/iRules.HTTP__host
URI: http://devcentral.f5.com/Wiki/default.aspx/iRules.HTTP__uri
or
PATH: http://devcentral.f5.com/Wiki/default.aspx/iRules.HTTP__path
when HTTP_REQUEST {
if { [HTTP::host] equals "wap.hungama.com" } {
pool desired.server.pool
}
else {
HTTP::redirect "http://www.google.com"
}
}
Hope this helps.
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
