Forum Discussion

ozgur_guler_344's avatar
ozgur_guler_344
Icon for Nimbostratus rankNimbostratus
Dec 30, 2009

Sharepoint URL redirect problem

Hello;

 

Sharepoint is open on port 81 on servers. So pool members are defined as XXXX:81. However virtual server is working on port 80.

 

Firstly when we tried access URL XXXX, it replied us with XXXX:81. So it wasn't working. The we created an irule and solved this issue. You can find it below.

 

 

Now; the problem is only about creating new user at sharepoint portal. When we go through Site Actions>Site Setup>Users and Groups and click to "New User", it again replies as http://XXXX:81/_layouts/aclinv.aspx?GroupId=5&Source=http%3A%2F%2Fnewportal%2F%5Flayouts%2Fpeople%2Easpx%3FMembershipGroupId%3D5, so doesn't work. If i delete ":81" and try again it works.

 

 

Althugh there is an irule that replaces 81 to 80, why i get this result when only creating a new user?

 

 

IRULE:

 

when HTTP_RESPONSE {

 

 

Check if server response is a redirect

 

if { [HTTP::header is_redirect]} {

 

 

Log original and updated values

 

log local0. "Original Location header value: [HTTP::header value Location],\

 

updated: [string map ":[TCP::remote_port]/ /" [HTTP::header value Location]]"

 

 

Do the update, replacing :

 

HTTP::header replace Location [string map -nocase {81 80} [HTTP::header value Location]]

 

}

 

}

3 Replies

  • Hi Ozgur,

     

     

    Does the redirect rewrite iRule fix the problem? If not, can you use a browser plugin like Fiddler for IE or HttpFox for Firefox to see where the reference to port 81 is coming from? It could be in the Location header in a redirect or the payload content.

     

     

    You should be able to use alternate access mappings to instruct the Sharepoint servers to use http:// and port 80 in their references to themselves. You can search the iRule forum for AAC or "alternate access mappings" for some related info.

     

     

    Aaron
  • The above irule fixes most of the problem. Now i see this problem, only when creating a new user at sharepoint portal
  • So then the second part of my comment applies:

     

     

    You should be able to use alternate access mappings to instruct the Sharepoint servers to use http:// and port 80 in their references to themselves. You can search the iRule forum for AAC or "alternate access mappings" for some related info.

     

     

    If you do want to use an iRule to fix this, you can use a browser plugin like Fiddler for IE or HttpFox for Firefox to see where the reference to port 81 is coming from. It could be in the Location header in a redirect or the payload content. You can use HTTP::header to update headers and a blank stream profile with a STREAM::expression (Click here) based iRule to rewrite response payload content.

     

     

    Aaron