DokuWiki: Redirect users on logout to front/start page
I have a DokuWiki site for some documentation, and I needed to have it so that users who are logging off and then logging back in are always redirected to the home page. (DokuWiki, by default, redirects them to the page that they were on when the logged out.)
I was able to find the code to handle this in actions.php in the root of my Dokuwiki install. In that file, there is a function called function act_auth($act). In that function, look for this piece of code:
//handle logout
if($act=='logout'){
That’s the one that handles the action when users log out.
The last line of that control sequence is:
act_redirect($ID,'login');
You just need to replace $ID with “”, and that redirects all users who are logging off to the front/home page. So when they log back in, they are on the start page.
New code:
act_redirect("",'login');

Brilliant. Works a treat. Thanks for documenting this.
Thanks! Glad you found it useful!