osCmax v2.5 User Manual
Results 1 to 7 of 7

Default.php/index.php

This is a discussion on Default.php/index.php within the osCommerce 2.2 Installation Help forums, part of the osCommerce 2.2 Forums category; Ok, I'm coming from a Windows/IIS background and I am used to default.* being the main index page but I ...

      
  1. #1
    New Member
    Join Date
    Nov 2002
    Posts
    5
    Rep Power
    0


    Default Default.php/index.php

    Ok, I'm coming from a Windows/IIS background and I am used to default.* being the main index page but I am curious as to why it's used in OSC instead of index.php as seems to be the norm in the Linux/Apache world. I'm not sure I even know how to change what the server uses for the index page (this is a shared, virutal hosting environment with Cpanel on Linux). Is that what I should be trying to do? I've just installed OSC for the first time (the guide was very helpful!) but I'm not sure about this.

    David

  2. #2
    Anonymous
    Guest


    Default

    create an index.php file with the contents:
    header("Location: default.php");
    and that will redirect from index.php to default.php

  3. #3
    Anonymous
    Guest


    Default

    If you want to change from default.php to index.php, there are a couple of things that need to be done.

    first: rename default.php to index.php
    second: open application_top.php (located in in /includes/)
    look for this line:

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

    change default to index.php

    third: in each of your language directories is a file also named default.php you need to rename each one to index.php ( located in /includes/languages/english/ etc.

    HTH

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    Or easier still,

    add this to your htaccess file:

    DirectoryIndex default.php default.htm index.php index.htm index.html

    Problem solved.

  5. #5
    New Member
    Join Date
    Nov 2002
    Posts
    5
    Rep Power
    0


    Default

    Wow, thanks for all the great feedback. I used the .htaccess suggestion in the end and it worked like a charm (nice to know how to do it other ways however). I have to check into that htaccess file more, it seems very useful. Thanks again, onward I go .
    David

  6. #6
    New Member
    Join Date
    Nov 2002
    Posts
    5
    Rep Power
    0


    Default

    One additional question on this area. Through the Cpanel (I have a shared virtual account on Linux/Apache and limited but growing experience with the platform), I am able to turn off indexing of directories that don't have an index file. Unfortunately, it seems this is allowed by default. My quesiton(s): is that normal as the default and more important, is there a way to modify that nifty .htaccess file so that all the directories underneath will have the same setting (no index) or does that require a separate .htaccess in each directory in my case? Thanks again.

    David

  7. #7
    Member
    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    0


    Default

    iirc, by default .htaccess directives apply not only to the directory the file is in, but also all subdirectories under it. So to answer your question, you won't need to add them to every directory!

    -- stan c",)

Similar Threads

  1. index.html the default page help
    By ZARZOR in forum osCommerce 2.2 Installation Help
    Replies: 10
    Last Post: 01-23-2005, 07:19 PM
  2. make catalog/index.php the default homepage of my website...
    By ReginaStelling in forum osCommerce 2.2 Modification Help
    Replies: 10
    Last Post: 09-20-2004, 01:00 PM
  3. Changing Index
    By wudsqrl in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 01-26-2004, 06:47 AM
  4. Default.php or index.php?
    By Dr_Evil in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 04-17-2003, 04:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •