• 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?

George

Active member
#1
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.
 

Brogan

XenForo moderator
Staff member
#2
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.
 

George

Active member
#3
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.
 

Brogan

XenForo moderator
Staff member
#4
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?
 

Brogan

XenForo moderator
Staff member
#6
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.
 

SneakyDave

Well-known member
#7
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.
 

SneakyDave

Well-known member
#8
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.
 

rEd86

Active member
#13
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
 

George

Active member
#17
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.