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

Page as homepage

Discussion in 'XenForo Development Discussions' started by TRACKMIXERS, Jun 1, 2012.

  1. TRACKMIXERS

    TRACKMIXERS Member

    Is there an easy way or tutorial to make a page the homepage?
    I know I can set the home page url but I would like to have it so if someone goes to blahblah.com they will go straight to my page.
     
    loophole likes this.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    A simple index.php file in the web root can redirect to any URL:

    Code:
    <?php
    
    header("Location: http://www.apple.com/");
    
    ?>
    
     
  3. TRACKMIXERS

    TRACKMIXERS Member

    I guess I should move my forums to /forums instead of root?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What page do you want to be the index? Is it a page within XenForo? Or is it something outside of XenForo?
     
  5. Sylar

    Sylar Well-Known Member

    Don't want to hijack the thread, but how would you do that without setting all the forums in a /forums directory?
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Peggy likes this.
  7. TRACKMIXERS

    TRACKMIXERS Member

    A page within Xenforo. I have my XenForo installed in root at the moment. I just wanted to use a XenForo page as my index page.
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    A page node?

    For the purpose of reassigning the index, the route changer addon works for "simple" routes without any extra parameters, but not routes like page nodes which have both a route and action (you will end up with index/nodename/, where the 'index' route is no longer invisible in the URL). If you create a small addon with its own simple route then you can use the route changer on that.

    If you don't care about URL aesthetics then you can do like Brogan:

    http://xenforo.com/community/threads/create-start-page-like-xenforo.31915/#post-364960
     
  9. TRACKMIXERS

    TRACKMIXERS Member

    Yes, I meant a page node. Thank you for the suggestions!
     

Share This Page