How to direct page after log in

Discussion in 'Troubleshooting' started by nuzpub525, Sep 16, 2008.

  1. nuzpub525

    nuzpub525 New Member

    Joined:
    Aug 12, 2008
    Messages:
    9
    I am just setting my site up. I have my folders protected and everything. I did a custom html page that people land on when they hit the login button.

    But after they log in, they are directed to the domain/amember/member.php which has info to log in again.

    Since I have two membership levels, once they login I want to send them to their member page, according to their membership.

    How do I do this?
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    In the product page there is a Product URL, set this to the page you want to redirect to.

    David
  3. clee

    clee New Member

    Joined:
    Aug 27, 2008
    Messages:
    14
    any idea how to keep the product URL but still always redirect to member.php after login?
  4. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    If you login at http://www.yourwebsite.xxx/amember/member.php , you will not be automatically redirected to the product URL. If you login at http://www.yourwebsite.xxx/amember/login.php , you will.

    If you want to redirect login.php to member.php, it can easily be done with .htaccess. That way even if someone visits http://www.yourwebsite.xxx/amember/login.php, they will be automatically redicted to http://www.yourwebsite.xxx/amember/member.php and will see their subscription details page.

    Tomas
  5. clee

    clee New Member

    Joined:
    Aug 27, 2008
    Messages:
    14
    I didn't think of that. Thanks.
    As a result, I had to make all login forms go to members.php as they were not being parsed in the redirect. Is that ok? It seems to work but just want to make sure.
  6. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    If it works then I don't see any problem either. The .htaccess redirect should work in just about every situation though.

    Tomas
  7. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    You can also hardcode a redirect in the login or other pages:

    <input type="hidden" name="amember_redirect_url" value="/redirectpage" />

    David

Share This Page