Change name of index.php

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
jondrew
Forum Members
Forum Members
Posts: 23
Joined: Thu Apr 03, 2008 9:59 am

Change name of index.php

Post by jondrew »

Hi,

Hope someone can help I've installed cms made simple on a server where there is a current site already using index.php. This site will eventually be replaced by the one I'm building but for the time being the client wants to keep it up while we build the new site. So I need to change the name of the index.php file in cms made simple - I've done this (changed to index2.php) and installed it all and it all works fine apart from you can't navigate around the site because when you click on one of the pages it uses the query string index.php instead of index2.php - is there a way to change this?

Thanks for your help!!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Change name of index.php

Post by calguy1000 »

No there isn't. 
The better mechanism to work with 'staging' sites is to put the install into a sub directory and then when time comes to move it live just move the files up one level and change the config.php and clear the cache.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jondrew
Forum Members
Forum Members
Posts: 23
Joined: Thu Apr 03, 2008 9:59 am

Re: Change name of index.php

Post by jondrew »

Ok thanks for the prompt reply. I've actually figured out a work around for the time being I've used this in the menu manager:

menutext}">{$node->menutext}

Basically hardcoding in the name of the page, I will then alter the menu manager once the site is up and running.

Cheers

Jon
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Change name of index.php

Post by calguy1000 »

That's only part of the solution.

You may have problems with links created by modules, and other plugins which all use a standard mechanism to create URLS.

Working in a subdirectory is the best solution.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Change name of index.php

Post by jmcgin51 »

@calguy - I agree that separate development and production environments are the preferred way to go.

However, what do you think of adding a config variable in config.php, something like "$cms_index_page", where the user could force a sitewide homepage change?  For example, setting this variable equal to "index2.php" would then allow the core at least to use index2.php to build urls, etc.  Obviously 3rd-party modules would have to support this separately, and that would be up to the module developer.  I'm just thinking out loud, and there are probably reasons this is not a good idea...
Post Reply

Return to “CMSMS Core”