Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In my SharePoint site, whenever I search in the upper box, it redirects me to _layouts/OSSSearchResults.aspx but I want it to redirect me to a different search results page.

I've changed the setting on top site collection Site Actions=> Site Settings => Search Settings to redirect me to page with path /Search/Results.aspx but it doesn't work.

So how can I redirect all search to /Search/Results.aspx page ?

share|improve this question
    
I have a similar problem But i cannot simply update the site collection settings. because i dont want this to be over the entire site collection. I only want a particalar teamsite to use this new search centre i created, not the entire site collection. –  user8169 May 3 '12 at 7:01
add comment

5 Answers

up vote 1 down vote accepted

Do you have Enterprise Search available to you or our you on foundation? If you have it available you will want to enable it and follow @Fox advise. If not, you can not redirect your page. Foundation search will always use the default OSSearchResults page.

If you want this capability, and you are on foundation consider deploying Search Server Express. http://www.microsoft.com/enterprisesearch/en/us/search-server-express.aspx

Search Server Express, is Foundation with Enterprise Search. The only limitation is that search cant be deployed across multiple servers (search service).

share|improve this answer
add comment

I suspect you have a Sharepoint Enterprise Search Site collection and you want to route Search Results there...

Have a look the following Settings Page: http://yoursitecollection/_layouts/enhancedSearch.aspx

Select "Enable custom scopes" and enter your URL as follow: /Search/Pages

Also a couple of other options on this page you might want to have look at.

Here is a full article on how to configure: http://sharepointgeorge.com/2010/configuring-enterprise-search-sharepoint-2010/

http://technet.microsoft.com/en-us/enterprisesearch/ee441229

share|improve this answer
    
no i didn't install Enterprise search it's the express one that come with SharePoint –  BigOmar Jul 27 '11 at 8:05
add comment

I ran into the same problem about a year ago. I found some information about modifying the ossssearchresults.aspx in the 12 hive (located in c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS) to use javascript to redirect to the custom results.aspx page. For example, see this page:

http://sharemypoint.wordpress.com/2008/02/11/redirecting-from-osssearchresultsaspx/

However, I didn't want to affect search functionality for the entire farm, just one particular site collection. I added a simple check to only redirect the search if the original search came from my particular site. The resulting javascript looks like this:

function getParam(name)
{
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    var regexS = "[\\?&]"+name+"=([^&#]*)";
    var regex = new RegExp( regexS );
    var results = regex.exec( window.location.href );
    if( results == null ) return "";
    else return results[1];
}

function redirectTo()
{
    urlTmp=getParam("u");
    if(urlTmp.indexOf("yourdomain.com%2Fsites%2Fpath_to_site")>0)
    {
        window.location="http://yourdomain.com/Search/Results.aspx?k="+getParam("k")+"&cs="+getParam("cs")+"&u="+getParam("u");
    }
}

redirectTo();

Hope this works for you. Let me know if you have any questions.

Rob

share|improve this answer
add comment

Why put yourself in all that trouble when you can just go Site Collection Administration -> Search settings and then add "http://yourservername/sites/yoursitename/Search/Pages/default.aspx" into the "Site Collection Search Results Page" field.

IT'S SO EASY!

share|improve this answer
add comment

There is a field target result page where you can just put results.aspx

share|improve this answer
    
The poster had already tried this. Please refer to the FAQ[1] on how to answer questions. [1]: sharepoint.stackexchange.com/faq –  Hugh Wood Nov 28 '12 at 8:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.