Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Redirect Unauthenticated Users to Custom URL View modes: 
User avatar
Member
Member
robert-federationmedia - 3/11/2013 9:48:45 PM
   
Redirect Unauthenticated Users to Custom URL
Hi,

I have been asked to create a micro-site within an existing Kentico site. This micro-site is contained within a folder under the main CMS Tree, and a requires a login. Non-authenticated users should be redirected to a login page within the micro-site.

How can I set Kentico to redirect unauthorised users to my chosen login page without affecting the authentication rules for the rest of the site?

I only want the authentication rules to affect pages under my folder in the CMS Tree.

(The micro-site probably should have been created as a separated Kentico site under the main Kentico instance, but it's too late for that now).

Thanks for any help you can offer!

Rob.

User avatar
Member
Member
eagleag - 3/12/2013 2:39:47 AM
   
RE:Redirect Unauthenticated Users to Custom URL
Hi,

Maybe you could add a userControl to micro-site master page, that checks if current user is authenticated.

if NOT then redirect to micro-site login page.
if YES do nothing.

I know its not a pretty solution but think its the easiest.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/12/2013 2:43:30 AM
   
RE:Redirect Unauthenticated Users to Custom URL
Hello.

What about setup given page as secured website area according to http://devnet.kentico.com/docs/devguide/secured_web_site_areas.htm? Does it help you?

Best Regards,
Radek Macalik

User avatar
Member
Member
robert-federationmedia - 3/12/2013 2:39:39 PM
   
RE:Redirect Unauthenticated Users to Custom URL
kentico_radekm wrote: What about setup given page as secured website area according to http://devnet.kentico.com/docs/devguide/secured_web_site_areas.htm? Does it help you?

Unfortunately not. The guide you linked to relies on setting the 'Website logon page URL' in Site Manager -> Settings -> Security & Membership.

But an existing login page with different styles has already been specified in that setting, and I need to redirect users to a different login page with a different layout and styles.

It sounds like eagleag's suggestion may be my only option.

:-|

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/13/2013 2:10:13 AM
   
RE:Redirect Unauthenticated Users to Custom URL
Hello.

I see. Well, in this case you can use the workaround eagleag suggested. You may want to see the following article about membership internals and API: http://devnet.kentico.com/docs/devguide/membership_api_examples_overview.htm

Best Regards,
Radek Macalik