Sitecore - Processing pages with multiple sites

I have a Sitecore project with multiple sites. I know how to handle error pages through webconfig ErrorPage, ItemNotFoundUrl, LayoutNotFoundUrl, LinkItemNotFoundUrl for one site.

However, I want to display different error pages for each site. How can i do this?

+3
source share
3 answers

In any case, you can probably store the URLs of the error pages for each site as element attributes /configuration/sitecore/sites/sitein web.config by extending the class Sitecore.Sites.SiteContext( see information on extending existing classes ).

SDN 404 /ItemNotFound, Sitecore.Sites.SiteContext.

ItemNotFoundUrl, , , 404. 404 , httpRequestBegin, 404 , null. , , Sitecore.Pipelines.HttpRequest.ExecuteRequest.HandleItemNotFound() Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest() web.config.

ErrorPage, , Sitecore.Pipelines.RenderLayout.SecurityCheck.Process web.config.

LayoutNotFoundUrl, , Sitecore.Pipelines.HttpRequest.ExecuteRequest.HandleLayoutNotFound web.config.

LinkItemNotFoundUrl , , renderField, , .

, Sitecore Shared Source .

+5

SDN , .

+4

Shared Source, , . Sitecore Error Manager.

, .

+4

Source: https://habr.com/ru/post/1773705/


All Articles