Home Page Issues

I didn't install XF to a directory, my forum index.php is in the root directory.

I've specified a custom page as the Home Page, and input the url in Options as the Home Page URL. However, the site doesn't go to it by default. If I input just my domain in my test browser (as a visitor) it goes to the forum index.

My preference is to avoid a splash page that is outside of XF. Even if the home page was a /pages/home URL that is auto-directed to when a visitor comes. Can this be done in Beta 2 ?
I considered that, but since everything appears to be driven from index.php it didn't seem like a good long-term solution. However, I've never tried it with XF.

Does this work for you?

Jake Bunce

XenForo moderator
Staff member
You can set the directory index to the file name of your custom homepage. For example, if the home page you made is "home.php" then you can use this code in a .htaccess file:

DirectoryIndex home.php
In my experience, DirectoryIndex would work only if the file actually existed. In this case, it is a XF page, not an actual php/html file.

Jake Bunce

XenForo moderator
Staff member
Oh I missed the fact that your home page is a xenForo 'page'.

I did some testing and you can actually specify a query string for the directory index. Theoretically you should be able to do this:

DirectoryIndex index.php?pages/mypage/
But for some reason this isn't working. I did some debugging and the reason for this not working appears to be related to the REQUEST_URI. It appears that xenForo relies on the REQUEST_URI to identify the page. When you pipe the page request through DirectoryIndex like this the REQUEST_URI is empty ('/').

Maybe the devs can comment on this. For now it appears as though you cannot set a xenForo 'page' as a directory index using this conventional approach.