Redirect

Discussion in 'Templates customization' started by evevera, Apr 30, 2011.

  1. evevera

    evevera Member

    Joined:
    Jul 28, 2010
    Messages:
    41
    How can I put in a redirect in the smarty template? Like I would like to redirect people to a different page when they go to /amember/index.php or /amember/login.php

    Is that possible?
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    You can hard code the redirect on login.html
    change:
    {if $redirect_url}
    <input type="hidden" name="amember_redirect_url" value="{$redirect_url|escape}" />
    {/if}
    to
    <input type="hidden" name="amember_redirect_url" value="/yournewurl/" />

    David
  3. fertilepress

    fertilepress Member

    Joined:
    Dec 6, 2008
    Messages:
    96
    This isn't working for me. Any idea of where I should look to find the problem? I have a virgin install of amember with a clean wordpress install (only plugin is amember). I have created the page I want to redirect to in wordpress and included the page link inside login.html. I'm at a loss as to what to do next.

    Thanks!

    renee
  4. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Can you share a link to the page where you have modified the login.html?
  5. fertilepress

    fertilepress Member

    Joined:
    Dec 6, 2008
    Messages:
    96
  6. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    I dont see the redirect. Try placing it after:
    <form name="login" method="post" action="/amember/login.php">

    David
  7. peco

    peco New Member

    Joined:
    Jun 5, 2011
    Messages:
    1
    The above is only useful if you can use a login from outside the forum and your web pages using wordpress.

    All pages you wish to use wordpress must have at least this in the top of the page,

    Code: Select all
    define('IN_PHPBB', true);
    $phpbb_root_path = 'phpBB3/';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();




    :) :confused: :)
    John Galt
    PECO, Sales Consultant
    Mifflin, PA, USA

Share This Page