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

Renaming index.php to something else?

Kevin

Well-known member
#1
This is really a 'planning for the future' question.... ;)

I'm looking at putting XF in the root forum of my production site, as opposed to a subforum (eg: /forums or /xf). However, in anticipation of having a portal page in the future in the root also would I be able to rename the XF 'index.php' to something else?
 

Blandt

Well-known member
#2
I'm just curious as to why?
Perhaps there is a better way to achieve what you want without renaming anything
 

Kevin

Well-known member
#3
I'm just curious as to why?
Because if, as mentioned, I put a portal in the same folder then the portal would be named index.php instead. ;) In the vB world there is setting in the vB ACP where you can specify the name of vB home page so that you can rename it to anything you want and all of your links would still work fine.
Perhaps there is a better way to achieve what you want without renaming anything
Possibly through .htaccess or something else but it'll be easier to be able to rename it.
 

Brogan

XenForo moderator
Staff member
#4
Would it not be better to have the portal page as home.php?

That's how I have it configured on my site at the moment.
 

Kevin

Well-known member
#7
Mine works exactly like that now - the portal/home page opens with the standard domain url and if it is appended with /home.php
But as mentioned the portal page would be the default page. Having to specify the file name as part of the URL defeats the goal.
 
#8
But as mentioned the portal page would be the default page. Having to specify the file name as part of the URL defeats the goal.
I think Brogan is trying to say he configured the server to use home.php as the standard page if no file name is appended, not index.php. That should be one line in your .htaccess (and is the way I would do this, too, btw).
 

Kevin

Well-known member
#9
I think Brogan is trying to say he configured the server to use home.php as the standard page if no file name is appended, not index.php. That should be one line in your .htaccess (and is the way I would do this, too, btw).
Thanks for the info' but to be frank I'll just leave this open to see what the devs say. The ability to rename index.php to something else is used quite often in the vB world and makes life much easier when working with portals & other 3rd party software in the same folder.
 

Erik

Well-known member
#11
Have you tried just renaming it and seeing if it works? You would also have to change the name in .htaccess if you're using SEO-friendly URLs. :)