Redirect to another page

Last post 12-29-2010, 5:56 PM by smolofsky. 13 replies.
Sort Posts:
  •  08-11-2009, 4:46 PM 13874

    Redirect to another page

    Page redirect is helpful when you want to open an outside page (which is not part of your Wild Apricot website) directly from your menu. Sometimes, organizations might have several websites and they want to add a link to the menu of Wild Apricot site that will take them directly to the other website.

    First, you need to create a new empty page. Next, insert the following script in the meta-tags > Raw Headers section of the page: (see meta tags section of page management)

    <script type="text/javascript">
    try
    {
    if (!top.adminpanel)
    {
    window.location = "http://www.redirect.site";
    }
    }
    catch(e) {}
    </script>

    Change http://www.redirect.site to the url of the page you want to re-direct to.


    Poetic Apricot (Matthieu)
    http://twitter.com/PoeticApricot
    Need help? Give me a call! 1-877-493-6090

    Customization help isn't a service we provide; I will do my best to help you in the forums as time permits however I recommend consulting our partners
  •  09-29-2009, 3:44 PM 14463 in reply to 13874

    • wchester is online. Last active: 02-09-2012, 4:33 PM wchester
    • Top 50 Contributor
    • Joined about 3 years ago
    • Posts 66

    Re: Redirect to another page

    I copied some instructions and code from a previous post here and it is a little different than above.  Can you tell me what the difference is between the two and when I should use which?  Here is the previous code.

    First, you need to create a new empty page. Next, go to edit mode, click on script button <S> and enter the following JavaScript code:

    <script type="text/javascript">
      try {
        if (!top.adminpanel) {
          window.location = "http://redirect to url";
        }
      }
      catch(e) {}
    </script>
    <noscript>
      <meta http-equiv="Refresh" content="0; URL=http://redirect to url">
    </noscript>

    Change http://redirect to url to the url of the page you want to re-direct to.

  •  09-30-2009, 10:19 AM 14467 in reply to 14463

    Re: Redirect to another page

    They both will work the same way, however code in the Raw Headers is executed far before the the HTML in the body of the page is. So the code in the first post will redirect the page faster.

    Poetic Apricot (Matthieu)
    http://twitter.com/PoeticApricot
    Need help? Give me a call! 1-877-493-6090

    Customization help isn't a service we provide; I will do my best to help you in the forums as time permits however I recommend consulting our partners
  •  10-01-2009, 12:41 AM 14474 in reply to 14467

    • wchester is online. Last active: 02-09-2012, 4:33 PM wchester
    • Top 50 Contributor
    • Joined about 3 years ago
    • Posts 66

    Re: Redirect to another page

    Thanks Matthieu.  As always, quick and informative responses.
  •  10-12-2009, 7:33 PM 14635 in reply to 14467

    • savvy1 is not online. Last active: 02-07-2012, 11:34 AM savvy1
    • Top 100 Contributor
    • Joined about 2 years ago
    • Posts 17

    Re: Redirect to another page- dead link

    Hello Matthieu,

    We have a slightly different version of same issue.  Client wants a few of the top level menu buttons to have no link... which forces user to select one of the drop-downs under it. We can easily do this with a normal site. 

    Can we put some code on those pages, such that the top level nav button shows, but clicking it will cause no action or redirect at all?  Thanks.

     

     

     

  •  10-14-2009, 9:50 AM 14679 in reply to 14635

    Re: Redirect to another page- dead link

    Hi,

    The easiest thing to do would be to redirect to the first subpage. It may be possible to stop the first level item from linking using JavaScript though it would be a bit complex. Our partners would be able to help you with that: http://help.wildapricot.com/display/DOC/Partner+directory
    Poetic Apricot (Matthieu)
    http://twitter.com/PoeticApricot
    Need help? Give me a call! 1-877-493-6090

    Customization help isn't a service we provide; I will do my best to help you in the forums as time permits however I recommend consulting our partners
  •  12-21-2009, 10:44 AM 15667 in reply to 14635

    Re: Redirect to another page- dead link

    savvy1,

    If you are still looking to accomplish this, please send me an email at support@wildapricot.com.


    Poetic Apricot (Matthieu)
    http://twitter.com/PoeticApricot
    Need help? Give me a call! 1-877-493-6090

    Customization help isn't a service we provide; I will do my best to help you in the forums as time permits however I recommend consulting our partners
  •  02-08-2010, 1:39 PM 16804 in reply to 15667

    • tanag is not online. Last active: 02-08-2010, 3:09 PM tanag
    • Top 500 Contributor
    • Joined about 2 years ago
    • Posts 4

    Re: Redirect to another page

    I'm still not understanding this.

    i just want to be able to dictate what page my members land on after they login.

    i created a login page, and then i want them to go to the members home i created.

    i'm not understanding the 'create an empty page' thing and the script stuff that has been posted seems to apply to external links.

    help!

     

  •  02-09-2010, 9:23 AM 16812 in reply to 16804

    Re: Redirect to another page

    At the moment it isn't possible to change which page members are redirected to after they log in, This is on our wishlist however and you can vote on it here: http://community.wildapricot.com/thread/11078.aspx

    Poetic Apricot (Matthieu)
    http://twitter.com/PoeticApricot
    Need help? Give me a call! 1-877-493-6090

    Customization help isn't a service we provide; I will do my best to help you in the forums as time permits however I recommend consulting our partners
  •  12-03-2010, 9:18 AM 20743 in reply to 16812

    Re: Redirect to another page

    How can I make the redirected outside page in the menu open to a new window (keeping the WA site open as well) ?

    Thanks.

  •  12-03-2010, 11:11 AM 20745 in reply to 20743

    Re: Redirect to another page

    Hello,

    Unfortunately this wouldn't be possible. You could redirect to a new page that has javascript to open a new window but all browsers now block windows opened automatically by Javascript.


    Poetic Apricot (Matthieu)
    http://twitter.com/PoeticApricot
    Need help? Give me a call! 1-877-493-6090

    Customization help isn't a service we provide; I will do my best to help you in the forums as time permits however I recommend consulting our partners
  •  12-28-2010, 8:44 PM 20935 in reply to 13874

    Re: Redirect to another page

    When I follow your redirect instructions using raw headers, when you click on link to the redirected page and then try the "Back" button, you keep going to redirected page. Any way to avoid this loop? 

  •  12-29-2010, 9:32 AM 20939 in reply to 20935

    Re: Redirect to another page

    Hi,

    Trying using this code instead:

    <script type="text/javascript">
    try
    {
    if (!top.adminpanel)
    {
    window.location.replace("http://www.redirect.site");
    }
    }
    catch(e) {}
    </script>


    Poetic Apricot (Matthieu)
    http://twitter.com/PoeticApricot
    Need help? Give me a call! 1-877-493-6090

    Customization help isn't a service we provide; I will do my best to help you in the forums as time permits however I recommend consulting our partners
  •  12-29-2010, 5:56 PM 20951 in reply to 20939

    Re: Redirect to another page

    Thanks, that works perfectly!
View as RSS news feed in XML
Membership Software - Wild Apricot