Changing index.php to main.php Changing index.php to main.php
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Changing index.php to main.php

Started by jjkatrina, June 08, 2005, 12:45:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jjkatrina

hello all again!  ;D

recently I have changed what was "index.php" to be called "main.php" because I have an index.html (and want that to load first) as my splash page and one told me that he couldn't see it (I guess because it was automaticly go to index.php instead of .html?! strange I know!!) so anyway, to avoid this I just renamed index.php to main.php as I said..

..now I went through all coppermine files and replaced instances of "index.php" with "main.php" and works GREAT! All but one area>> the breadcrumb area (IE Home >> Category >> Album) still points to old "index.php?cat=3" etc. ..all I want is it to obviously says "main.php?cat=3" but there are not even any "index.php" left on any of my files? Where could it still be reading this from??

Any ideas friends? Thank yoU! :o

kegobeer

#1
Seach thru all of your coppermine files, especially in functions.inc.php.  Windows XP allows you to search files for words and phrases, if you do this.  You probably just missed one or two instances of it.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

jjkatrina

well I used dreamweavers search and replace function which usually seems pretty reliable (both on code option and text)

..but I will use windows searchs right now! thank you for the reminder  ;)

any other ideas incase it doesn't find it? where else would info about index.php and the breadcrumb info be located except for those files? anywhree extermally?

thanks for your help again!!  :D

jjkatrina

I am such the stupide sometiems!  >:(

THank you for making me re-check..it turns out I just forgot to upload the functions.inc.php to my server! hah!! (it was only in the include folder to be changed)

THANK you  :-*

jjkatrina

(feel free to mark this one solved!! sorry to waste you're time and space!!)

Tranz

Something to look into is editing the .htaccess file to determine the order of the default files so that the index.html file would be displayed before the index.php file. If you can do that, you'd save yourself the hassle of doing this each time you update coppermine.

jjkatrina

does anyone know what the code looks like in an htaccess file? the one in my main folder is currently blank (so I don't know how to list which file I want my main site to load) do you just put an order in there? like:

index.html
index.php


etc. in that order you wanted to load? please help..thanks!

Nibbler

It goes like this:

DirectoryIndex filename1 filename2 filename3

jjkatrina

hey Nibbler! thank you for the response..I updated my htaccess file like you said, and it works great for the main public dir. (ie, www.site.com/index.php) but I also have a few sub folders that I use for other purposes (ie, www.site.com/featured/) and when you type that exactly in (www.site.com/featured/) it gives a list of the folders and files instead of automaticly picking up the index.html file like it previously did? it seems with this new htaccess entry, the other folders in my site don't recognize the index.html that is in them?

I tried adding another entry below it:

DirectoryIndex index.php  //for the base, which works
DirectoryIndex featured/index.html  //for the folder, but it still doesn't recognize the index.html when you just type featured/

???  anyone know?

Stramm

either you have eg DirectoryIndex index.html index.php index.shtml
in your base dir... then apache looks first for index.html, then for index.php and last for index.shtml in the base dir and all its subdirs. If you want to change the order ina subdir then you have to place a htaccess file there as well with the new order you desire

you can set that globally in the httpd.conf as well. Recommended for performance reasons

Joachim Müller

@Stramm: thanks for explaining this to jjkatrina

@jjkatrina (and others who want the same thing): the coppermine support board is not the best place in the world to look for hints on apache tweaking. There are better resources available, I recommend googling for "DirectoryIndex tutorial", or looking it up in the apache manual.