installing xenforo in root dir question?

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.
 
If I was to install xenForo in to the root dir , can I rename index.php to forum.php with any errors?
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.
 
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.
 
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?
 
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.
 
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.
 
Not necessarily.
You can add DirectoryIndex home.php to your .htaccess file which will load that by default.

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.
 
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
 
Top Bottom