Home Page Issues

motowebmaster

Well-known member
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?
 
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:

Code:
DirectoryIndex home.php
 
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:

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