Page 1 of 2
Little Help needed for changing: index.php into portfolio.php
Posted: Fri Jan 12, 2007 4:47 am
by detonate
Hi everyone, it's my first post here.
I'm so happy to see there's a huge community using this handy tool!
I did some search and wiki to fix a little issue... never found a solution.
how can I change index.php?page=test into portfolio.php?page=test
and affect all links accordingly and always point to portfolio.php as my root file?
Thanks in advance :)
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Fri Jan 12, 2007 9:38 am
by Dee
Inside the CMS Made Simple sourcecode there are references to index.php in a lot of places/files. This is not configurable - so it would take a lot of changes.
Maybe you can use (a .htaccess file with) an apache
rewrite rule to achieve this, but a more logical solution would be to install CMS Made Simple in a subdir (/portfolio/).
Grtz,
D
Re: Little Help needed for changing: index.php into portfolio.php in same folder
Posted: Fri Jan 12, 2007 4:41 pm
by detonate
Dee, thanks a lot for your explications and example.
I've been up almost all night trying to figure out this simple but "unfixable" issue.
The reason why I needed to rename the page is because my index.php is my real fist page
(splash page that cointains certain PHP values echoed)
I would've love to point to portfolio.php once my index.php link was clicked. It's kinda disapointing having to redirect into another folder level just so the pages and queries link correctly...
Would be cool to address this and maybe have a little script that could handle this type of custom request.
Any one else had this issue and fixed it otherwise?
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Fri Jan 12, 2007 4:52 pm
by jmcgin51
what about changing your server settings so that index2.php is the only page recognized as the default page?
Then change your "real" default page name to index2.php. A user going to "yoursite.com" would really be going to "yoursite.com/index2.php", and then you could have a link on there to your CMSMS homepage, which would be yoursite.com/index.php...
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Fri Jan 12, 2007 9:30 pm
by Dee
jmcgin51 wrote:
what about changing your server settings so that index2.php is the only page recognized as the default page?
Then change your "real" default page name to index2.php. A user going to "yoursite.com" would really be going to "yoursite.com/index2.php", and then you could have a link on there to your CMSMS homepage, which would be yoursite.com/index.php...
Indeed, setting something like
Code: Select all
DirectoryIndex intro.php index.php
in httpd.conf (or a .htaccess file) should do the trick, then people requesting "yoursite.com" would get yoursite.com/intro.php and index.php can be used by CMS Made Simple.
Regards,
D
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Fri Jan 12, 2007 9:41 pm
by Dr.CSS
You do know that all browsers look for index.html,htm,php,asp,etc,etc.. to open, if no index.whatever no open page...
Untried but from all I've read that's the way it goes...
EDIT: I just put one in one of my sites, with 777 chmod all permissions go, and can't get it... unless you put the file name in it won't work...
http://www.multiintech.com/cmsms5/
No index.php,html,etc. no go...
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Fri Jan 12, 2007 9:58 pm
by Dee
mark wrote:
You do know that all browsers look for index.html,htm,php,asp,etc,etc.. to open, if no index.whatever no open page...
Untried but from all I've read that's the way it goes...
EDIT: I just put one in one of my sites, with 777 chmod all permissions go, and can't get it... unless you put the file name in it won't work...
http://www.multiintech.com/cmsms5/
No index.php,html,etc. no go...
I'm not sure what you're trying to say, but I think I'm gonna have to disagree
What did you try?
(I just tried putting a .htaccess file that changes apaches DirectoryIndex and it works fine, the server must be configured to allow overriding it in a .htaccess though)
Grtz,
D
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Fri Jan 12, 2007 10:01 pm
by Dee
mark wrote:
but from all I've read that's the way it goes...
Not
entirely true
Regards,
D
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Fri Jan 12, 2007 10:20 pm
by jmcgin51
my IIS vhost allows me to decide which types of files can be used for my default page, and in what order they should be served. For example, my current setting is as follows:
"index.asp,index.php,index.html,index.htm,Default.htm,Default.asp,default.aspx,index.aspx"
If I removed all of these and simply entered "index2.php" or "enter.asp", and uploaded a file of the same name to my root, that file would become my homepage. I could then link to index.php to hit the CMSMS homepage.
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Fri Jan 12, 2007 10:25 pm
by Dee
The same thing is done on apache using the
DirectoryIndex configuration directive.
Regards,
D
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Sat Jan 13, 2007 12:07 am
by calguy1000
mark wrote:
You do know that all browsers look for index.html,htm,php,asp,etc,etc.. to open, if no index.whatever no open page...
Untried but from all I've read that's the way it goes...
EDIT: I just put one in one of my sites, with 777 chmod all permissions go, and can't get it... unless you put the file name in it won't work...
http://www.multiintech.com/cmsms5/
No index.php,html,etc. no go...
Actually, it's a server option not a browser thing. Apache for one, has options to look for index.* if no filename is supplied in the URL. and you can specify the search preference too. but in this case, the user has an index.php that provides some defaults, and he has CMS installed into the same directory (or wants to).
Although I would discourage changing the source for CMS, one could do a global search and replace through all files and change all occurrances of index.php to .
However, this user has a valid point. He wants to provide a splash screen, and have it appear even on the URL field like it is appearing from the same URL/directory. I personally solved this problem by installing CMS into a subdirectory, but.... to each his own.
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Sat Jan 13, 2007 12:13 am
by detonate
Everyone!
Thank you soooo much for all the info.
I've learned a lot from all of you regarding my issue.
Will go ahead with the 'directory index' configuration and make it point accordingly.
Hope to be able to contribute and help others with any issues in a near future.

Re: Little Help needed for changing: index.php into portfolio.php
Posted: Sat Jan 13, 2007 6:53 am
by Dr.CSS
Well that's one way to get the conversation rolling, my example is for just putting a diff. file/page other than index w/o any reconfiguring of redirects/.htaccess or server changes, if you take a standard configured server and throw startpage.html in place of index.html is it going to give it to you w/o out calling it in the URL?...
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Sat Jan 13, 2007 4:59 pm
by jmcgin51
Mark,
You're right; on a server with "standard" configurations, it will not give you startpage.html because it doesn't know that startpage.html should be the default page. It will first look for a pre-established default page (based on the default server configuration), such as index.asp, default.php, home.html, index.aspx, etc... If it cannot find one of these pages in the requested directory, it will either give you a list of files in the directory (if directory browsing is enabled) or it will give you a "you do not have permission to view this directory" error, if directory browsing is disabled.
If you want startpage.html to be your default page, you would need to either remove all other default pages from the default page list in the configuration menu, or you would need to put startpage.html first in the list of default pages. Then the server sees that startpage.html is a legitimate default page, and returns it to the browser.
Re: Little Help needed for changing: index.php into portfolio.php
Posted: Sat Jan 13, 2007 5:06 pm
by Dr.CSS
I put one file in the directory something.htm and nothing else and you can't see it unless you call it directly...