Forum Discussion
Venkat_96085
Nimbostratus
Apr 24, 2009URL Redirection
Hi friends,
I am a newbie to iRules and neither a coder. i have the following scenario and i need irules for this.
When some user connects to a URL say example: www.xyz...
hoolio
Cirrostratus
Apr 27, 2009Hi Venkat,
You can use HTTP::redirect command (Click here) to redirect the client. You would want to check if the request was to the root document (/) or fslink before redirecting:
when HTTP_REQUEST {
Check if request is to / or /fslink
switch [string tolower [HTTP::path]] {
"/" -
"/fslink" {
Redirect client
HTTP::redirect "http://www.xyz.com/search/home.asp"
}
}
}
If you want the client to not see the change in the path, you could rewrite the URI using HTTP::path (Click here).
Aaron
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
