Announcement

  •  » Website
  •  » How to set default home page redirect to login page?

#1 2011-09-29 10:48:18

Vanndy
Translation Team
Cambodia
2011-09-29
35

How to set default home page redirect to login page?

Hi Piwigo team,
I am creating a photo gallery website using Piwigo. My purpose is that if a user, though he/she have register already on my page, not yet log-in their account, when they visited my site, I want the page redirect to log-page (http://localhost/mysite/identification.php)
How can I do with this?

Thanks in advance.
Vanndy

Offline

 

#2 2011-09-29 10:51:31

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13496

Re: How to set default home page redirect to login page?

Offline

 

#3 2011-09-29 11:08:22

Vanndy
Translation Team
Cambodia
2011-09-29
35

Re: How to set default home page redirect to login page?

Thank plg for quick warmly reply to me. After i added a line of code ( $conf['guest_access'] = false; ) into the file config.inc.php now it work :) .
However, the message 'You are not authorized to access the requested page' is appear when I visit that my page at the first time. It should only appear when I try to access admin page without user log-in up to two times. Can we disable this message when we firstly visit to the page?

Kind Regards,
Vanndy

Last edited by Vanndy (2011-09-29 11:15:02)

Offline

 

#4 2011-09-29 12:41:45

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13496

Re: How to set default home page redirect to login page?

The answer is currently "no, not without extra coding" :-/

Offline

 

#5 2011-09-30 03:36:14

Vanndy
Translation Team
Cambodia
2011-09-29
35

Re: How to set default home page redirect to login page?

Oh, thank you. I'll try it...

Offline

 

#6 2011-09-30 04:41:58

Vanndy
Translation Team
Cambodia
2011-09-29
35

Re: How to set default home page redirect to login page?

Hi again,

I want to get fix redirect url to ( http://localhost/piwigo/identification.php ) when I first access to my page without user log in; with this url, it won't appear "You are not authorized to access the requested page" message.
But it always redirect to ( http://localhost/piwigo/identification.php?redirect=%252Fpiwigo%252F ).

Can I do this?

Thanks,
Vanndy

Offline

 

#7 2020-04-21 13:20:22

giftmax
Member
2020-04-21
3

Re: How to set default home page redirect to login page?

your cms  iw wordpress? if wp have more pluging and 2line code for  solve this..

Offline

 

#8 2021-10-12 00:02:31

Midas
Member
2021-10-11
1

Re: How to set default home page redirect to login page?

Hi,

Long time since the original post, but I was looking for an answer to this question, and since this topic is still one of the first I found googling, here is what I finally did to get it working :

1. Install the plugins "PWG Stuffs" and "Advanced Menu Manager"

2. In the PWG Stuffs plugin configuration :

    - Add a new block -> select "Identification" block

    - Block management -> drag the Identification block to the top ; check "Mask on home page" for Main block

    - click on the Edit button of the Identification block -> select only "show on home page" and check "remove from menubar"


3. In the Advanced Menu Manager plugin configuration :

    - remove the guest account access from all menus except "Identification"


You should now have a blank page as your home page for unlogged users, with only identification available. Once the user is logged in, the menus and regular access should be available.

Offline

 
  •  » Website
  •  » How to set default home page redirect to login page?

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2021 · Contact