The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
Since Sitefinity 5.3 you have the ability to set a FrontEndUrl property, which is defined at the Site level and can be also granularly configured per site in a Multi Site instance. The FrontEndUrl is url of a page, that you will be redirected to if you access a protected frontend page in you web site.
This way you can directly control the logic of how to prompt users for login, when they are trying to access a restricted resource or action.
When you are working with Multisite Management you could have separate FrontEndUrl for each site, and this is configured for each site when setting the site properties:
For more information and an example use case for configuring this property you can look into the Display the Reply buttons in Forum threads and Forum posts section of this article from our documentation.
Alternatively, if you want a more custom-tailored solution, since Sitefinity 5.2 there has been an event for unauthorized access on front end page, where you could redirect the response depending on your needs. The example below is showing how to perform the redirect. It is not just a configuration, but it is much more flexible.
You have the ability to redirect the unauthorized users to a specific page or redirect them to other Sitefinity pages.
The source code above should be placed inside the
Application_Start method of a Global.asax.cs file. To add such file in your Sitefinity project follow the steps below:
1. Open your project in Visual Studio
2. Right click on your project and select Add -> New item..
3. Search for Global.asax
A Global.asax.cs file could be found attached.
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.Learn More
Subscribe to get all the news, info and tutorials you need to build better business apps and sites
You have the right to request deletion of your Personal Information at any time.
You can also ask us not to pass your Personal Information to third parties here: Do Not Sell My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.