This parameter is stored in the properties bag of the SPWeb object. You can update it as follows:
using (SPSite site = new SPSite("http://server/site"))
using (SPWeb web = site.OpenWeb())
{
web.AllProperties["SRCH_ENH_FTR_URL"] = "/searchcenter/pages";
web.Update();
}
source
share