MOSS: Enable Anonymous Search – The Easy 3 Step Way

1: Make a copy of “C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATELAYOUTSosssearchresults.aspx”

2: Remove Inherits=”Microsoft.SharePoint.WebControls.LayoutsPageBase” from the same file.

3: Add the following script to the the same file after changing the bolded text to your custom page.

function getURLParam(strParamName){

var strReturn = “”;

var strHref = window.location.href;

if ( strHref.indexOf(“?”) > -1 ){

var strQueryString = strHref.substr(strHref.indexOf(“?”)).toLowerCase();

var aQueryString = strQueryString.split(“&”);

for ( var iParam = 0; iParam <>

if (

aQueryString[iParam].indexOf(strParamName.toLowerCase() + “=”) > -1 ){

var aParam = aQueryString[iParam].split(“=”);

strReturn = aParam[1];

break;

}

}

}

return unescape(strReturn);

}

var urlstring = ‘/Search/Pages/results.aspx?k=’ + getURLParam(‘k’) + ‘&cs=’ + getURLParam(‘cs’) + ‘&u=’ + getURLParam(‘u’)

location.replace(urlstring);