The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End htaccess login through PHP and 401 redirection

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #31665

    I updating a website at work. IT’s on movable type which is a first use for me so that makes things slightly more complicated to me since I don’t know the system so well.

    There used to be one page protected by .htaccess.
    This page is getting to be a zone with several pages now.

    The logging has changed though. From the usual popup logging, it’s now required to have a clean form to manage the logging.

    I found a way to log-in through the form to the htaccess zone:
    in the action page something like if the params are here :

    header("location: http://".$_GET.":".$_GET."");

    That works fine.
    My problem is :
    – if the login/passwd are not correct, the regular popup logging appears for a second try.
    – if an access is done through a deeper page, there will be the popup as well.

    I wanna find a way to redirect to my loging page if the login is wrong or if the user is accessing a deep page without being authenticated.
    I tried

    ErrorDocument 401 /login-page.php

    But it doesnt seem to work ..
    I’ve been searching a lot but I’m running out of idea..

    Would you have an idea ?
    thank for your help!


    no it’s not. I was just trying to simplify the example.
    What’s on your mind about it ?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.