Forum Discussion
fillstrsoh_2962
Oct 26, 2011Nimbostratus
SharePoint 2010 - virtual with two pools
We are trying to implement SharePoint 2010 using one virtual server with two pools using a pool for each site. dv-strsohioportal is the virtual server which has an irule that sends traffic to a specific pool based on the URI being either dv-strsohioportal/sites/inv or dv-strsohioportal/sites/its. The irule works but it appears that the AAM is not configured correctly because SharePoint returns a 404 error once it translates the URI to dv-strsohioportal/sites/inv/default.aspx or dv-strsohioportal/sites/its/default.aspx.
irule:
when HTTP_REQUEST {
log local0. "URI - [HTTP::uri]"
if { [HTTP::host] contains "dv-strsohioportal" } {
log local0. "URI - [HTTP::uri]"
switch -regexp [string tolower [HTTP::uri]] {
"/sites/its.*" {
log local0. "This time pool - ITS"
pool dv-strsohioportal_its_pool }
"/sites/inv.*" {
log local0. "This time pool - INV"
pool dv-strsohioportal_inv_pool }
}
}
}
If they add dv-strsohioportal to the AAM configuration it redirects to 10.100.x.x/sites/inv/default.aspx or 10.100.x.x/sites/its/default.aspx. Should we abandon using AAM and try to use the IIS rewrite rules instead?
Thanks,
Mark
- Michael_YatesNimbostratusHi fillstrsoh,
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/sites/its*" { log local0. "This time pool - ITS" pool dv-strsohioportal_its_pool } "/sites/inv*" { log local0. "This time pool - INV" pool dv-strsohioportal_inv_pool } } }
- I think the original iRule is O.K. as the -glob and -regexp, as shown above, do exactly the same.
- fillstrsoh_2962NimbostratusMichael and Kurt,
- in your last iRule:
when HTTP_REQUEST { if { [HTTP::host] contains "dv-strsohioportal" } { switch -glob [string tolower [HTTP::uri]] { "/sites/its*" { log local0. "This time pool - ITS" pool dv-strsohioportal_its_pool } "/sites/inv*" { log local0. "This time pool - INV" pool dv-strsohioportal_inv_pool } } log local0. "URL - [HTTP::method] [HTTP::host][HTTP::uri]" log local0. "Host: [HTTP::header Host]" log local0. "Request: [HTTP::request]" } }
- fillstrsoh_2962NimbostratusKurt,
- O.K. now I'm a bit cinfused. You are rewrting the external URI dv-strsohioportal.tld to paris-test.tld and you distribute the requests to two different sites (/inv and /its). Is that correct? If so, why is your internal domain (paris-test.tld) different that your external (dv-strsohioportal.tld)? In that case you'll have to rewrite the Host Header as well. Furthermore you should also use a STREAM profile to rewrite any occurances of paris-test in the HTML code to dv-strsohioportal, otherwise some absolute links might not work, as the external client does not know how to access http://paris-test.tld.
- fillstrsoh_2962NimbostratusKurt,
when HTTP_REQUEST { if { [HTTP::host] contains "dv-strsohioportal" and [HTTP::uri] contains "inv" } { log local0. "URI - [HTTP::uri]" log local0. "This time pool - INV" pool dv-strsohioportal_inv_pool HTTP::header replace Host paris-test HTTP::uri "http://paris-test[HTTP::uri]" log local0. "URL - [HTTP::method] [HTTP::host][HTTP::uri]" log local0. "Host: [HTTP::header Host]" log local0. "Request: [HTTP::request]" } elseif { [HTTP::host] contains "dv-strsohioportal" and [HTTP::uri] contains "its" } { log local0. "URI - [HTTP::uri]" log local0. "This time pool - ITS" pool dv-strsohioportal_its_pool HTTP::header replace Host dublin-test1 HTTP::uri "http://dublin-test1[HTTP::uri]" log local0. "URL - [HTTP::method] [HTTP::host][HTTP::uri]" log local0. "Host: [HTTP::header Host]" log local0. "Request: [HTTP::request]" } }
- Mark,
- fillstrsoh_2962NimbostratusKurt,
- This seems to be the default format. Any link that does not have a specific filename defined gets redirected by SharePoint.
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