Redirects, page unavailable, and Office 365
I am currently facing an interesting issue. I need to perform a redirect but the destination will be based on the response. I need to send site.abccompany.com to https://sso.abccompany.com/adfs/ls?wa=wsignin1.0&wtrealm=urn:federation:MicrosoftOnline&wctx=MEST%3D0%26LoginOptions%3D1%26wa%3Dwsignin1%252E0%26rpsnv%3D2%26ct%3D1348618157%26rver%3D6%252E1%252E6206%252E0%26wp%3DMBI%26wreply%3Dhttps%253A%252F%252Fabccompany.sharepoint.com%252Fsites%252Fsite but if abccompany.sharepoint.com/sites/site is not available redirect to down.abccompany.com. I have this in 2 different F5s and need to make the second set of F5s just return a Site Down message if abccompany.sharepoint.com/sites/site is unavailable.
I thought about trying to do this by monitoring a node but that doesn't give me what I want. The next thought I had was to use an iRule to check abccompany.sharepoint.com/sites/site for a response and redirect site.abccompany.com accordingly.
Currently I am just using this iRule to do the redirect but when SharePoint is unreachable it just hangs.
START RULE
when HTTP_REQUEST {if { [HTTP::host] ends_with "site.abccompany.com" } {HTTP::redirect "https://sso.abccompany.com/adfs/ls?wa=wsignin1.0&wtrealm=urn:federation:MicrosoftOnline&wctx=MEST%3D0%26LoginOptions%3D1%26wa%3Dwsignin1%252E0%26rpsnv%3D2%26ct%3D1348618157%26rver%3D6%252E1%252E6206%252E0%26wp%3DMBI%26wreply%3Dhttps%253A%252F%252Fabccompany.sharepoint.com%252Fsites%252Fsite[HTTP::uri]"} else {} }
END RULE