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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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
| |||
| |||
| create an index.php file with the contents: header("Location: default.php"); and that will redirect from index.php to default.php |
|
#3
| |||
| |||
| 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
| ||||
| ||||
| Or easier still, add this to your htaccess file: DirectoryIndex default.php default.htm index.php index.htm index.html Problem solved. |
|
#5
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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",) |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| index.html the default page help | ZARZOR | osCommerce 2.2 Installation Help | 10 | 01-23-2005 08:19 PM |
| make catalog/index.php the default homepage of my website... | ReginaStelling | osCommerce 2.2 Modification Help | 10 | 09-20-2004 01:00 PM |
| Changing Index | wudsqrl | osCommerce 2.2 Modification Help | 1 | 01-26-2004 07:47 AM |
| Default.php or index.php? | Dr_Evil | osCommerce 2.2 Installation Help | 2 | 04-17-2003 04:56 PM |