Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change default.php to index.php


Guest

Recommended Posts

Step 1 - Rename catalog/default.php to index.php

 

Step 2 - Rename catalog/includes/languages/YOUR LANGUAGE/default.php to index.php

 

Step 3 - Open catalog/includes/application_top.php and change define('FILENAME_DEFAULT', 'default.php');

to

define('FILENAME_DEFAULT', 'index.php');

Link to comment
Share on other sites

If you have your catalog intalled in the root directory you will be able to use http://www.MySite.com and index.php wil be your start page.

 

PS- Please read the sticky at the top of this forum. It is for Tips and Tricks and not for questions.

Link to comment
Share on other sites

  • 5 weeks later...

:?: :cry: I've tried all the methods suggested and I still cannot display the /default.php page when dormain name is entered www.mydormain.com

 

Did I missed something?

Since i just started, can I just download osCommerce and start over?

 

Thanks.

 

-Ln

Link to comment
Share on other sites

If you haven't made any major changes and just want to start over you can. If you're going to do that I would suggest removing the OSC stuff you already have installed so that there isn't any confusion.l

Link to comment
Share on other sites

Hi

 

Do you still have index.htm or index.html or default.htm in the root. These all take precedent over *.php.

 

Actually if you set up an .htaccess file and put default.php and index.php first, they come before the .html .htm etc.

Link to comment
Share on other sites

thanks for this GREAT but still simple TIP,

took me 2,5 hours ++ to find it ....lol

 

but i am happy now....AGAIN

 

after looking at it I thought, i knew that already :shock: :shock: :lol:

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

Step 1 - Rename catalog/default.php to index.php

 

Step 2 - Rename catalog/includes/languages/YOUR LANGUAGE/default.php to index.php

 

Step 3 - Open catalog/includes/application_top.php and change   define('FILENAME_DEFAULT', 'default.php');

to

define('FILENAME_DEFAULT', 'index.php');

 

Will this also work for the Admin folder?

Link to comment
Share on other sites

Step 1 - Rename catalog/default.php to index.php

 

Step 2 - Rename catalog/includes/languages/YOUR LANGUAGE/default.php to index.php

 

Step 3 - Open catalog/includes/application_top.php and change define('FILENAME_DEFAULT', 'default.php');

to

define('FILENAME_DEFAULT', 'index.php');

 

I am on the most recent OSC2.2 SnapShot (3/22/03) and followed Steps #1 & #2 above, when I got to Step#3 I searched catalog/includes/application_top.php but there is no define('FILENAME_DEFAULT', 'default.php'); in there....anyone know why?

 

I also placed in my .htacess

 

DiRectoryindex index.shtml index.html index.htm index.php default.php /missing.html 

AddHandler server-parsed .shtml 

AddHandler server-parsed .html 

AddHandler server-parsed .htm

 

I am getting this error when trying to access the my shop:

 

Warning: main(includes/languages/english/default.php) [function.main]: failed to create stream: No such file or directory in /home/universa/public_html/shop/index.php on line 33



Fatal error: main() [function.main]: Failed opening required 'includes/languages/english/default.php' (include_path='.:/usr/local/lib/php') in /home/universa/public_html/shop/index.php on line 33

 

Any suggestions as to why this is not working for me?

Link to comment
Share on other sites

Good Morning Joe!

 

The Dev Team pulled a sneaky on us.... :D The define FILENAME used to be in application_top.php and is now in the NEW file called filenames.php

 

Change your define in filenames and you'll be back up and running. Enjoy!

Link to comment
Share on other sites

The Dev Team pulled a sneaky on us.... :D The define FILENAME used to be in application_top.php and is now in the NEW file called filenames.php

 

In order to keep up / get an idea of what goes on in development you can subscribe to the commit mailinglist.

It will show you what has been changed in CVS along with the diffs (differences) and comments.

 

http://lists.sourceforge.net/lists/listinf...nfo/tep-commits

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Two easy solutions:

 

1. Create index.html in your site root and insert a meta-refresh tag to run default.php

 

2. If you are not an ISP, ask your ISP to change your document root to the catalog folder, also ask him to change the index options to include default.php. Both should be done in httpd.conf

 

No.2 is by far the best, some ISPs don't permit the use of .htaccess, anything running apache has an httpd.conf. :D

If nothing changes - everything stays the same - http://e-commerce.e-businesshosting.co.uk

Link to comment
Share on other sites

Search Engines really are not keen on that refresh idea. They tend to ignore you when you do that.

 

The .htaccess is a good idea and if you want the catalog to be your main page ... then put it in your root. :D

Link to comment
Share on other sites

You might want to ask your host to add the default.php to the DirectoryIndex setting in the httpd.conf file of Apache or if your running the server yourself just edit the /apache/conf/httpd.conf file yourself and search for "DirectoryIndex"

 

I have mine setup like this

 

DirectoryIndex default.php index.php

 

It will look for the default.php file first

 

Hope this helps.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...