Little Help needed for changing: index.php into portfolio.php

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.
detonate
New Member
New Member
Posts: 3
Joined: Wed Jan 10, 2007 5:28 pm

Little Help needed for changing: index.php into portfolio.php

Post 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   :)
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Little Help needed for changing: index.php into portfolio.php

Post 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
detonate
New Member
New Member
Posts: 3
Joined: Wed Jan 10, 2007 5:28 pm

Re: Little Help needed for changing: index.php into portfolio.php in same folder

Post 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?
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Little Help needed for changing: index.php into portfolio.php

Post 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...
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Little Help needed for changing: index.php into portfolio.php

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

Re: Little Help needed for changing: index.php into portfolio.php

Post 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...
Last edited by Anonymous on Fri Jan 12, 2007 9:49 pm, edited 1 time in total.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Little Help needed for changing: index.php into portfolio.php

Post 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
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Little Help needed for changing: index.php into portfolio.php

Post by Dee »

mark wrote: but from all I've read that's the way it goes...
Not entirely true ;D

Regards,
D
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Little Help needed for changing: index.php into portfolio.php

Post 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.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Little Help needed for changing: index.php into portfolio.php

Post by Dee »

The same thing is done on apache using the DirectoryIndex configuration directive.

Regards,
D
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Little Help needed for changing: index.php into portfolio.php

Post 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.
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.
detonate
New Member
New Member
Posts: 3
Joined: Wed Jan 10, 2007 5:28 pm

Re: Little Help needed for changing: index.php into portfolio.php

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

Re: Little Help needed for changing: index.php into portfolio.php

Post 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?...
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Little Help needed for changing: index.php into portfolio.php

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

Re: Little Help needed for changing: index.php into portfolio.php

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

Return to “CMSMS Core”