How to remove something (the port) from the URL as returned in the search results (searchresults.aspx):
UPDATE : the behavior depicted below should not happen after installing October 2009 Cumulative Update package:
Download October 2009 Server-Package for WSS (974989)
Download October 2009 Server-Package for MOSS 2007 (974988)
If you have not upgraded or need a workaround, read on:
Starting with the Infrastructure update, the following behavior can be encountered when searching for people:
The port (usually 80) is appended to the URL of the location for each result, resulting in error for all the internet facing personal sites.
For example, imagine you published your my site location in Alternate Access Mappings at : http://mysites.mydomain.com to be accessed from the intranet and https://mysites.mydomain.com to be accessed from the internet.
When you are searching for a user when logged on from the internet side of things, you will receive the results pointing to https://mysite.mydomain.com:80/Person.aspx?GUID... which will throw an error upon accessing (page not found).
If you want to overcome the issue (eg, you are looking for a quick fix) here's what you can do:
Go to your search center with tabs and search for something, just to get to the people results page.
Edit the page and modify the People Search Core Results web-part.
Click on the XSL Editor button to get to the XSL style sheet applied to the resultset.
The URL for each result is under the following section:
<!-- This template is called for each result -->
<xsl:variable name="id" select="id"/>
replace <xsl:variable name ="url" select ="url"/> line with:
<xsl:variable name ="temp" select ="url"/> <!-- We put the url value from the resultset in temp variable -->
<xsl:variable name="url"> <!-- This will be the value used in the xsl from now on in this section as $url -->
<xsl:when test="contains($temp,':80')"> <!--We check temp variable for the occurrences of string :80-->
<xsl:value-of select ="concat(substring-before($temp,':80'),substring-after($temp,':80'))"/>
<!--We remove from temp variable the occurrences of string :80-->
<xsl:value-of select ="$temp"/> <!--If we did not find the :80 we will retain the default value (url) as defined above-->
So from now on, wherever we will use $url we will have the translated version of the url returned in the resultset
eg. for https://mysite.mydomain.com:80/person.aspx?GUID....... the result would be https://mysite.mydomain.com/Person.aspx?GUID.......
Of course you will also need to play with the Search High Confidence Results web Part to Edit it accordingly.
The place where you need to replace the url is :
<xsl:if test="$DisplayHC = 'True' and $IsFirstPage = 'True'" >
<xsl:variable name="url" select="url"/>
<xsl:variable name="id" select="id"/>
replace <xsl:variable name ="url" select ="url"/> line as above
PingBack from http://sharepoint.jai-world.com/archives/37
Thanks a bunch! I was wondering what happened to my people search.
I am not able to edit the searchresult page, so that i can edit the people search core result webpart and change the xslt to replace the ":80".
it's not that page is checkout by some one , even it's not giving option to override the change checked out by some one.
also the page is not checked out by some one.
simple the page edit is disabled in the site action menu.
need a quick help!
This usually can mean two things:
either you do not have the proper rights to edit the page, or the menu entry was customized somehow.
By default, the page should be editable by the site collection owners ,the administrators and generally by the people having designe rights on the site
Thank you so much for posting this. This issue was driving me crazy.
It would be good if you could point towards or outline what the "correct" fix would be.
As said in the beginning of the post, the behavior was addressed and solved with October 2009 Cumulative updates