Make "index.php" a config var

Talk about new features for CMSMS and modules.
Post Reply
Glenn

Make "index.php" a config var

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Make "index.php" a config var

Post 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
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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Make "index.php" a config var

Post 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...
Post Reply

Return to “Feature ideas”