Developer forum

Forum » CMS - Standard features » Redirect user after logout

Redirect user after logout

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Is there a way to control the redirect of a user upon logout?
We have a setup where the user is left on a page that is restricted for anonymous users and when logging out, it displays a nasty page message.

I am sure there is a configuration that can help with this use case but I can't figure it out.

Thank you,
Adrian


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

You can add redirect=someurl to the LogOff link:

/Admin/Public/ExtranetLogoff.aspx?redirect=/Default.aspx?ID=123

I think the default is "no" for the redirect parameter in Swift.

Imar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Thank you very much!


Adrian

 
Ferri Halfhide
Reply

Hi Imar,

 

I found this answer, but I can’t seem to get it to work.

When I click log out on my dashboard, I stay on the same page instead of being redirected.


Where exactly do you configure this? Do you add it under Web & HTTP → Redirects?

If so, could you please show me what you fill in there (for example: path, redirect to, etc.)?

Or is this something that needs to be configured somewhere else?

Thanks in advance for clarifying!

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You need to set that up on the logoff link it self. So if you create a navigation item that is a shortcut to /Admin/Public/ExtranetLogoff.aspx?redirect=/Default.aspx?ID=123 a redirect will happen to page with id 123 after logoff.

What happens in the logoff is described here: https://doc.dynamicweb.dev/documentation/implementing/users/logoff.html

 

You must be logged in to post in the forum