1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Set different home page for guests

Discussion in 'XenForo Questions and Support' started by kingston, Oct 10, 2013.

  1. kingston

    kingston Well-Known Member

    If a guest visits my forum I want to redirect them our account upgrade page (because this particular forum is a premium paid access forum) where they can purchase access and if they are already logged in I would like them to go to the default forum home. Is there an easy way to do that?

    Thanks!
     
  2. kingston

    kingston Well-Known Member

    I did a redirect and it worked. Here is my code:

    Code:
    <xen:if is="{$visitor.user_id}">
    <xen:else />
    <meta HTTP-EQUIV="REFRESH" content="0; url=http://redirected.url">
    </xen:if>
     
    KenSmith likes this.
  3. Jeremy

    Jeremy XenForo Moderator Staff Member

    If that's your entire if, place an exclamation point in front if the {$visitor and remove the else and it'll still work.
     
    kingston likes this.
  4. kingston

    kingston Well-Known Member

    updated code

    Code:
    <xen:if is="!{$visitor.user_id}">
    <meta HTTP-EQUIV="REFRESH" content="0; url=http://redirected.url">
    </xen:if>
     

Share This Page