Is it possible to link the home page to index.php instead to /?

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
cnisvcs
Forum Members
Forum Members
Posts: 37
Joined: Wed Jan 30, 2008 3:02 am

Is it possible to link the home page to index.php instead to /?

Post by cnisvcs »

Currently the page designated to be a home page is referenced in the menu as http://www.mydomain.com/. Is it possible to alter that so the link reads:

http://www.mydomain.com/index.php ?

Here is why: on the same server I have the previous version of the site, still public, but nicely tucked away in the separate directory. The index page for the previous version is not index.php, so I can have them co-existing without a coflict. However, whenever I preview the new, CMSMS based, version of the site and click 'home', I am taken back to the original site. I would love to avoid that. It would be perfect if it was possible to set the home page link explicitely including the index.php for the time of the development and when the CMSMS site goes up, change the home page link back to http://www.mydomain.com/. Is this at all possible? I am sure with enough patience I could find a cell in the DB with the home page address and alter it as the need is, but is there a more elegant way?

Best regards!
chiggeybean
Forum Members
Forum Members
Posts: 18
Joined: Tue Jan 29, 2008 11:29 pm

Re: Is it possible to link the home page to index.php instead to /?

Post by chiggeybean »

I had the same problem today and solved it by changing the home page in the CMS to a link (instead of content) with the entire path to the static page. You can also do it with a little mod_rewrite, but this is easier.
cnisvcs
Forum Members
Forum Members
Posts: 37
Joined: Wed Jan 30, 2008 3:02 am

Re: Is it possible to link the home page to index.php instead to /?

Post by cnisvcs »

I am a little new to CMSMS, so maybe I did something wrong. I created a link to index.php, but the CMSMS did not allow me to use it as the default page. Didn't want to fight with that...

mod_rewrite - not sure if that would work, because people calling www.mydomain.com would be redirected by Apache to www.mydomain.com/index.php, being a site in a working progress. Unless I am missing something about mod_rewrite...

However, I found a quick and dirty workaround: logged into PHPmyAdmin, found the table 'cms_content', in that table found the row with the home page and replaced the value in the 'default _content' cell from '1' to '0'. Now each page, including the home page, is referenced as: http://www.mydomain.com/index.php?page=page-alias. That's what I wanted. When the site goes up I can revert the change. So far so good... I will let you all know if I notice any undesired side effects.
Pierre M.

Re: Is it possible to link the home page to index.php instead to /?

Post by Pierre M. »

Hello,

may be this is not CMSms specific : what you want is your webserver to http redirect (302) / to /index.php ? See the redirect directive of the Apache Manual : one line config. Does it solve your issue ?

Pierre M.
cnisvcs
Forum Members
Forum Members
Posts: 37
Joined: Wed Jan 30, 2008 3:02 am

Re: Is it possible to link the home page to index.php instead to /?

Post by cnisvcs »

Hi Perre,

This issue is actually CMSMS specific. I want the Apache to continue calling home.php as an index file, which is a starting page for the original version of the site. That way everyone still sees the original site while I keep developing the new version on the production server. When the home page in CMSMS is referenced as www.mydomain.com/index.php?page=home I am not taken back to the old site whenever I click 'home' on the menu and that was my objective. Thanks for the post, though.

Best regards.
Pierre M.

Re: Is it possible to link the home page to index.php instead to /?

Post by Pierre M. »

Then may be you are looking for Apache's DirectoryIndex directive ? you put home.php, no index.php, and it isn't CMSms related ? This way the public side only know about the old site and you point to index.php on the dev side ? Could this thread be the solution : http://forum.cmsmadesimple.org/index.ph ... 276.0.html

Pierre M.
Post Reply

Return to “CMSMS Core”