jba3126
Aug 08, 2011Cirrus
Select Pool Based on URI with Host Rewrite
Hi All, In short we are going from SharePoint 2007 to 2010. To ease the pain of migrating sites I suggested we use the F5 LTMs to redirect based on the URI. I attempted this with a http class until I discovered that SharePoint checks the host name in the HTTP header. I've been told we might have as many as 30 URIs/Paths to redirect to the old 2007 instance and will need to remove them from the list so to speak as they migrate to 2010. I've done my very best to try to piece together a script that will do the trick and unfortunately I'm falling short :(
Summary:
http://www.abc.com
/uri1
/uri2
/uri3
/uri4
etc. needs to go to sharepoint2007pool and change host from www.abc.com to www.xyz.com. Everything else needs to go to sharepoint2010pool with no host change.
Here is my attempt to accomplish:
when HTTP_REQUEST {
switch -glob [HTTP::path]
if { [HTTP::path]] "/sites/dts*" } {
Rewrite host header value and select pool
HTTP::header replace Host www.xyz.com
pool sharepoing2007pool
}
else {
pool sharepoint2010pool
}
}
***For ease of adding and removing multiple sites, I'm very interested in how I might use the datagroups. That would make it much easier for me to add and remove sites as needed.***