Help on changing the index.php page?

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.
Locked
Jack @ PharSide

Help on changing the index.php page?

Post by Jack @ PharSide »

Can anyone help me with this one? This is probably a simple thing although I couldn't find it. I am trying to figure out how to make the URLs in the site point to index2.php or something else for development rather than the default index.php. Where can this be edited and is it in several places or one editable variable?

Thanks for any help,
-J
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Help on changing the index.php page?

Post by Dee »

You can change the page extension and query variable in config.php by changing $config['page_extension'] and $config['query_var'] respectively.
I'd setup CMSMS in a subdir (or on another server) for development.

Regards,
D
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Help on changing the index.php page?

Post by Dr.CSS »

If you are just trying to hide the site while developing it you can make a simple index.html page and it will show up instead of index.php, all browsers look for .html pages first.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Help on changing the index.php page?

Post by tsw »

Actually browsers dont look for the index file, apache (and other http servers) have configuration setting for which file to use as index file if none is specified by the client (browser) in apache its just a list like index.html index.php index.php3 index.... so on, first one found will be used
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Help on changing the index.php page?

Post by Dr.CSS »

OH, well I didn't know it that way but it sounds like it works along the same lines as what I thought.
Does it still mean that it will serve an .html file first?

I've used the .html (trick) way to set up numerous sites and it always worked, is there some configurations where it won't work?
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Help on changing the index.php page?

Post by tsw »

it just depends on how the server is set up.

usually html is first but there might be exceptions...
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Help on changing the index.php page?

Post by Dee »

On apache the DirectoryIndex directive sets this:
http://httpd.apache.org/docs/2.2/mod/mo ... ctoryindex

Code: Select all

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents.  The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.php index.html index.htm index.html.var
(in my setup index.php is served before index.html)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Help on changing the index.php page?

Post by Dr.CSS »

I learn some thing new every day...
.
.
.
.
.
.
.
.
.
.
.
or stagnate.....  ;)
Locked

Return to “CMSMS Core”