Redirect signup page for logged in users

Discussion in 'Troubleshooting' started by bmedwards, Oct 24, 2014.

  1. bmedwards

    bmedwards New Member

    Joined:
    Jun 27, 2014
    Messages:
    16
    Hello,

    I have a signup form offering a free product. After the user registers for the product, the signup form automatically logs them in to their account.

    At the top of our website, we have a very bold button to 'signup now' and it links to the signup form at /amember/signup. When the logged in user clicks on the button, it takes them to the signup form where all the user fields are blank, and just a 'next' button appears. They often hit the 'next' button, and it results in them creating another account in their name, and is very confusing to the user. How can I redirect the signup form to either the amember profile page or main page?

    I have tried to to a redirect to look for the amember_nr cookie and redirect /amember/signup to /amember/profile and it is not working.

    Any Suggestions?

    Thanks,
    Brian
  2. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    At the end of the link on your 'Signup now' button try adding '?amember_redirect_url=' (without inverted commas) and then add valid link to the page you want to redirect to.
  3. bmedwards

    bmedwards New Member

    Joined:
    Jun 27, 2014
    Messages:
    16
    Hi,

    Thanks for your suggestion, but it did not appear to work.

    I tried these two styles, and still get the signup form:
    /amember/signup?amember_redirect_url=/amember/profile
    /amember/signup/?amember_redirect_url=/amember/profile

    Any other ideas?
  4. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Last edited: Oct 25, 2014
  5. bmedwards

    bmedwards New Member

    Joined:
    Jun 27, 2014
    Messages:
    16
    I ended up getting the redirect rule working, which works fine for me. I look for the amember_nr cookie, and if present, I redirect the user to the main page. This prevents multiple signups from the same user.

    Edit to amember .htaccess file:
    RewriteBase /amember
    RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+)
    RewriteRule ^signup /signup/member [R=302,L]


    I will look into the solution above as well, and see if it works on my environment as well.

    Thanks for your help.

Share This Page