Forum Discussion
VJ_96387
Nimbostratus
Feb 22, 2010URL REDIRECTION!!!
Hi there,
I am near to F5 irules and need your help regarding the below requirement.
I need to redirect the
http://abc-a.xyz.com (accessed via internet) ...
hoolio
Cirrostratus
Feb 22, 2010Hi VJ,
You can check the URI (everything after the hostname[:port] in the URL) using HTTP::uri or the path (URI minus the query string) using HTTP::path. You can rewrite the URI and path with these same commands. Or you can send a 302 redirect using HTTP::redirect.
If you want to redirect all requests to / to /irj/portal, you can use:
when HTTP_REQUEST {
Check requested URI
if {[HTTP::uri] eq "/"}{
Redirect client
HTTP::redirect "https://abc-a-xyz.corp/irj/portal"
}
}
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
