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

installing xenforo in root dir question?

Discussion in 'XenForo Questions and Support' started by George, Feb 22, 2011.

  1. George

    George Active Member

    If I was to install xenForo in to the root dir , can I rename index.php to forum.php without any errors?

    I do not want the forums as the home page for the site but would like to install xenforo in the root dir.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It's not as simple as that, you would have to edit some of the core files.

    It was discussed previously but I don't think anyone ever actually did it.
     
  3. George

    George Active Member

    I do not want to have to edit that every time. See I made my dir name "forums". So now when I go to a forum I have forums/forums in the domain structure. So I figured I would put xenForo in the root dir but not have the forums as the home page. So now back to the thinking box.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Presumably you plan to install something else in the root which also has an index.php file?

    Can't you rename that one instead to something like home.php?
     
  5. George

    George Active Member

    But every time you go to domain.tld you would always see index.php as default. Which in this case is the forums.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Not necessarily.
    You can add DirectoryIndex home.php to your .htaccess file which will load that by default.

    I should stress though that I haven't tested this so can't confirm how it will work with other software in the root.

    This is ultimately why I decided to install my forum in the /community directory - to avoid this very issue.
     
  7. SneakyDave

    SneakyDave Well-Known Member

    I had the same situation, but I just renamed my "forum" directory "community" like it is here on xF.

    The other problem that people mention is that if their site name is "xxxxforums.net", there's a little bit of duplication in the URL's with "xxxxforums.net/forum/", but I'm not that picky.
     
  8. SneakyDave

    SneakyDave Well-Known Member

    Yes, if you're running Apache, you'd have to add it to your .htaccess file that came with xF, as that would be the .htaccess file in the root directory that would be served. So you might run the chance of overwriting that .htaccess file on an xF upgrade.
     
  9. Brogan

    Brogan XenForo Moderator Staff Member


    The .htaccess file isn't included in the upgrade package, for that very reason.
     
    SneakyDave likes this.
  10. SneakyDave

    SneakyDave Well-Known Member

    Oh that's right!
     
  11. Onimua

    Onimua Well-Known Member

    With the help of this you can actually be able to do that.
     
  12. George

    George Active Member

    No other ideas huh?
     
  13. rEd86

    rEd86 Active Member

    The "DirectoryIndex" suggestion that Brogan made does exactly what you were asking. So when you go to:

    http://domain.tld/

    the "home.php" file would be displayed. (or whatever the default page you define with DirectoryIndex) index.php is just a standard default page, which can be overwritten as discussed.

    Is there more that you are trying to do that would prevent this solution from working?

    --Ed
     
  14. George

    George Active Member

    I thought it would have been a way just to rename the index file. Maybe the devs will give us the option in future versions.
     
  15. George

    George Active Member

    Plus when I add what Brogan said index.php gets redirected to home.php so the forums do not work at all.
     
  16. PeterT

    PeterT Active Member

    If you name your home page index.html it should take priority over index.php
     
  17. George

    George Active Member

    I would like the home page index.php and the forums forums.php just like any other site. I can not run php code in the html file.
     
  18. PeterT

    PeterT Active Member

Share This Page