How customize 'Thank you for visiting our web site.' Page
I would like to know if I can redirect to a static html page when the site is showing 'Thank you for visiting our web site.' This happens to anonymous users because I have restricted all pages access to backendusers.
Thank you
Hi Vincent,
Currently it is hard to redirect from the under construction page. We need to implement 403 response when someone tries to access a page with no permissions, but now you get page not found and you are redirected to the under construction page.
To change the under construction page you can try the following
1. Crate a new class that inherits from SitefinityRoute.
2. Override GetRouteData and before calling the base check the current request and return
var siteMapProvider = SitefinitySiteMap.GetCurrentProvider();string virtualPath = httpContext.Request.AppRelativeCurrentExecutionFilePath.Substring(2) + httpContext.Request.PathInfo;var unresolvedPath = ObjectFactory.Resolve<UrlLocalizationService>().UnResolveUrlAndApplyDetectedCultures(virtualPath); var node = siteMapProvider.FindSiteMapNode(unresolvedPath);if(node == null) return new RouteData(this, new UnderConstructionRouteHandlerCustom());base.GetRouteData(httpContext)UnderConstructionRouteHandlerCustom that inherits from UnderConstructionRouteHandler and there override GetTemplateInfo where you can return your custom templateprotected void Application_Start(object sender, EventArgs e) Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(this.AfterInit); private void AfterInit(object sender, ExecutedEventArgs args) RouteCollection c = new RouteCollection(); c.Add("Frontend", ObjectFactory.Resolve<SitefinityRouteCustom>());