Forum Discussion
Redirect request to different pools and rewrite the URL
The request goes to: site1.com/communities but the content is served from site2.com (different pool)
All this needs to happen on the backgroup and the client URL cannot change. So they will still see site1.com/communities
or
The user will enter site.mydomain.com and be sent to newsite.newdomain.com/page1/page2... While this happens the displayed URL should not change and remain site.mydomain.com.
So far I've done this:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "/communities/default.aspx"} {
pool cmnty_pool
} elseif { [HTTP::uri] ends_with "/communities/video"} {
pool cmnty-video_pool
}
}
but this rules does not keep the URL intact and displays the pool b URL
thanks,
- farache_28983Nimbostratusany ideas anyone?
- Brian_69413NimbostratusAre the URI's the same on both pools or is the new server doing some sort of redirect when you use the old site URI?
- natheCirrocumulusfarache
- farache_28983NimbostratusHey brian,
No.. the URI are not the same on either pool..
I am the one doing the redirect to a different pool when the request comes in, so technically the request never reaches pool A when request A with URI "/communities" comes in...
http_request to sitea--> VIP A-->Pool A (default pool)
http_request to sitea/communities--> VIP A --> PoolB (new site with address www.siteB.com) but on the browser still has to look like "sitea/communities "
I hope this helps
thanks man,
Francisco
- Srini_87152Cirrostratushey Frache, Can you try this..
- John_Alam_45640Historic F5 AccountI think that you need the proxypass iRule. Look at this link,
- Brian_69413NimbostratusI understand that you are trying to get the traffic to a different pool, but I was asking whether the new pool servers require a different path in order to serve up the same content. For example, if "http://oldsite.com/communities" translates to "http://newsite.com/differentcommunity", then you should do the following:
when HTTP_REQUEST { if { [HTTP::uri] eq "/communities" }{ HTTP::path "/differentcommunity" pool pool_b } else { pool pool_a } }
Recent Discussions
Related Content
* 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