Forum Discussion

rob0030_110553's avatar
rob0030_110553
Icon for Nimbostratus rankNimbostratus
Jun 26, 2013

iRule won't redirect on 404

Hello everyone. Very novice when it comes to iRule writing, especially considering half the time I just patch together stuff I find on here from you people who know what you're actually doing. Anyhoo...

 

I've got an iRule that has been working fairly well for redirecting folks who are going to a specific URI for SharePoint 2007, and then intercepts and sends them to the corresponding 2010 site. The iRule looks like the below:

 

 

when HTTP_REQUEST {

 

 

set group $::group_sharepoint2010

 

set redirect http://share2010.generic.com

 

set uri [HTTP::uri]

 

set lower_uri [string tolower [HTTP::uri]]

 

 

if { [matchclass $lower_uri starts_with $group] } {

 

log local0. "site match - the http_uri is [HTTP::uri] - redirecting to $redirect$uri"

 

HTTP::redirect $redirect$uri

 

}

 

}

 

The group "group_sharepoint2010" has the following in it as an example:

 

"/sites/abcd"

 

"sites/efgh"

 

 

So what I would expect for it to do is when somebody sends a request to a VIP that has the rule applied in the form of "share07.generic.com/sites/abcd", that it would then redirect them to "share2010.generic.com/sites/abcd".

 

This was actually working fairly well, until we shut down some of the SharePoint2007 sites, and now when the user tries to hit the 2007 site, instead of being redirected to the 2010 site, they get a 404 from the old site.

 

Any help at all would be appreciate!

 

2 Replies

  • Just spitballing here, but you may want to throw in a few additional log statements to see what the client is requesting. Also, which TMOS version?
  • Kevin, thanks for the response, but we weren't able to wait and engaged F5 support and fixed the issue. Thanks again!