Forum Discussion
farache_28983
May 14, 2012Nimbostratus
Redirect request to different pools and rewrite the URL
I am trying to write an iRule that will rewrite the URL from a user request to a new URL and and a URI.
The request goes to: site1.com/communities but the content is serv...
nathe
May 15, 2012Cirrocumulus
farache
Check out Joe's blog who explains about redirection and URIs and should help you: https://devcentral.f5.com/weblogs/Joe/archive/2005/07/27/ModifyingUriWithoutRedirect.aspx
So you could use something like:
when HTTP_REQUEST {
if { ([HTTP::host] eq "site1.com") && ([HTTP::uri] eq "/communities" } {
HTTP::header replace "Host" "site2.com"
HTTP::uri "/someother_uri"
}
}
So, site1.com/communities would be rewritten as site2.com/someother_uri but the browser would not change. Obviously you may have to tweak this looking at your example above but this should get you on your way.
Does this help at all?
N
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