Page 1 of 1

Make "index.php" a config var

Posted: Sat Jun 24, 2006 9:11 pm
by Glenn
How about making the filename "index.php" a config variable like

Code: Select all

$config['main_page'] = "index.php";
The reason is because when redesigning a site for a client the main cmsms page named index.php can cause a problem with an exisitng homepage, also called index.php.

For instance: By allowing us to call the main cmsms page "cmsindex.php" in the config file (and of course renaming the file itself to cmsindex.php) I can build a new site with CMSMS on the same server, right alongside an exisiting site. Once the CMSMS site is finished, I can just rename the old "index.php" to something like "index_old.php" (or delete it), then rename cmsindex.php to index.php in the filename as well as the config file.

Of course I can rename the file now, but the way things currently work all the menumanager templates use "index.php" so the navigaiton menus always look for index.php. Currently, just renaming the file doesn't so any good when developing a site.

Re: Make "index.php" a config var

Posted: Sun Jun 25, 2006 3:34 pm
by calguy1000
Personally to solve this problem I just install cms made simple into a sub-directory,  set it up the way I want, and when it's time for rollout either use a rewrite rule to redirect from the root into the sub-directory, or just move the contents of the sub-directory up one level, and  change the urls in the config.php

Re: Make "index.php" a config var

Posted: Sun Jun 25, 2006 4:00 pm
by Dr.CSS
is the original index.php a static page or dynamicaly generated...
i ask because my solution for running CMSMS in the root of an existing site, most sites use index.html as the home page, all browsers look for index.html first then index.php, i leave the index.html in the root and develop the site and i can give client link to www.thesite.com/index.php for them to see progress make suggestions/tweaks and once it's good to go live i just rename/delete index.html and visitors are served index.php, long story short if you can rename original index.php to index.html, hopefully w/o having to change a bagillion other pages, then you can run CMSMS in the root/background till going live...