Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
redirection to login page
Avatar
wikidodger #1
Member since Jun 2006 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: redirection to login page
Hello,

is there a possibility to redirect a user that is unauthorized to access certain files in dokuwiki to the login page rather than displaying the message "unauthorized" ?

regards
Avatar
koko #2
Member since May 2006 · 161 posts · Location: Zonhoven Belgium
Group memberships: Members
Show profile · Link to this post
hi,

Maybe this page can help?

http://wiki.splitbrain.org/wiki:tips:htaccessa…?s=unauth…
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Avatar
wikidodger #3
Member since Jun 2006 · 6 posts
Group memberships: Members
Show profile · Link to this post
ok i found the solution...

i just edited the fetch.php to redirect to the login page instead of printing "unauthorized".

regards
Avatar
lornajane #4
Member since Jul 2006 · 14 posts
Group memberships: Members
Show profile · Link to this post
I did something similar - where you usually see the "perhaps you forgot to login" message, I wanted to prompt the user to log in instead of showing them that message.

In actions.php, look for the line
return 'denied';

And replace it with
return 'login';

This just makes the user sent to the login page rather than the page telling them they need to go to the login page.  To be friendly I also added a message on the line before:
msg('You must log in to view this page',-1);

Hope that helps someone.
LornaJane ( www.lornajane.net )
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-02-17, 22:24:13 (UTC +01:00)