Redirect modern search page to classic search center page in SharePoint 2019

New Contributor

Consider you have a modern communication site in SP2019 where users perform search. Search query redirects to the modern search page whose look and feel is not the same as classic search page. Few users may not like the new look and feel.

You are looking for ways to customize this new look and feel for modern search page.



This is a by design behavior as you cannot customize the modern search page for modern sites in SharePoint 2019. 




Consider you have a classic search center site collection and are exploring options to redirect the search request from this modern search page to the classic search page. You can use below redirection using URL rewrite tool in IIS to achieve the goal.

Modern Search page: http://Sharepoint/_layouts/15/search.aspx/sitefiles?q=document

Classic search page: http://sharepoint/sites/search/Pages/results.aspx?k=document




<clear />

<rule name="Modern to Classic" enabled="true" patternSyntax="Wildcard" stopProcessing="true">

<match url="*_layouts/15/search.aspx*" />

<conditions logicalGrouping="MatchAll" trackAllCaptures="true">

<add input="{QUERY_STRING}" pattern="*q=*" />



<set name="QUERY_STRING_A" value="{C:2}" />


<action type="Redirect" url="http://SharePoint/sites/search/Pages/results.aspx?k={QUERY_STRING_A}" appendQueryString="false" redirectType="Found" /> 





Note: Please consider configuring URL rewrites using below article whether its supported or not by Microsoft. 

1 Reply

@sujeetsks Unless MS has changed something, this isn't working for me.  I am running the August 2021 CU.  Can someone verify?