Handling URL requests with different file extensions in Sitecore
Hey there! Welcome to "Sitecore Series" Post is all about handling URL requests with different file extensions in Sitecore. In Sitecore, we usually add presentation in items, but what if we want the data to be displayed from the files added in webroot with .txt, .html or any other extensions? Example Scenarios: 1) Displaying a security file (mysitedomainurl/security.txt) 2) Loading a custom 404 page instead of default error page when the request is handled by IIS (mysitedomainurl/404.aspx or mysitedomainurl/404.html) Here is the solution for different scenarios: Allowing specific extensions : Apply patch by adding required extensions as below: <processor type= "Sitecore.Pipelines.PreprocessRequest.FilterUrlExtensions, Sitecore.Kernel"> <param desc="Allowed extensions (comma seperated)">.txt, .html</param> </processor> Allowing all extensions: <processor type= "Sitecore.Pipelines.PreprocessRequest.FilterUrlExtensi...