SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am us a 'SearchBoxEX' control on my site. Since my site has a language variation, I use a resource files to specify the 'SearchResultPageURL' property.

The page is located on the root of each variation:

ie. "http://.../en-US/SearchResults.aspx" ie. "http://.../fr-FR/SearchResults.aspx"

How do I specify the URL in my resource such that it is a relative URL that will always point to the correct 'SearchResults.aspx' regardless on which sub-site I may be on.

share|improve this question

As far as I am aware that needs to be set at site collection level.


PowerShell script to do it.

$site = Get—SPSite "http://[site]"
foreach ($web in $site.Allwebs) {
    Write—Host "Modifying all search result pages in site ($($web.Url))"
    $web.AllProperties["SRCH_ENH_FTR_URL"] = http://[searchsite]/

Also: You can also set this to happen on a Web Provisioned event receiver for new webs.

share|improve this answer
There are two different pages, depending on whether sites exist under the variation or not. It is up and running, however I specify the full URL to the page. If I ever change IP for example, I will need to update the resource file. How would I, for example, specify a link on a page to always go to the root-site level, without specifying the entire URL? – TeddyRuxpin Dec 3 '12 at 17:21
Why don't you use relative URLs? Under /_layouts/enhancedSearch.aspx "Example: /SearchCenter/Pages or server/sites/SearchCenter/Pages"; – Hugh Wood Dec 3 '12 at 17:29
I had tried that, turns out I forgot the initial "/". Thanks, for the help. – TeddyRuxpin Dec 3 '12 at 17:49

Your Answer


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.