osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Root install /index.php fix

This is a discussion on Root install /index.php fix within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; If you have a store that is installed in the root directory (you DO NOT have a /catalog dir -- ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 01-25-2007, 06:11 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,484
Thanks: 73
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post Root install /index.php fix

If you have a store that is installed in the root directory (you DO NOT have a /catalog dir -- you go directly to www.domain.com and your store is right there) this contribution may be for you.

What it does:

When you are on a page your site, to search engines especially, would show as www.domain.com AND www.domain.com/index.php we all know that you don't need the index.php one and you do not want to show two links with the same content to the search engines...

So. here is what I did.

First in:

index.php

Change:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

To:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT_HOME);

Then, in: includes/filenames.php find:

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

And change it to:

// Start index.php fix.
// define('FILENAME_DEFAULT', 'index.php');
define('FILENAME_DEFAULT', '');
define('FILENAME_DEFAULT_HOME', 'index.php');
// End of index.php fix.

Now all the links in header and footer, etc. that use to say www.domain.com/index.php will only say www.domain.com.

There are A LOT of other fixes for this on osCommerce forums and they either involved changing a bunch of files and other ways that I couldn't get to work (I'm sure they must work, but I couldn't get them to work (along with a few other people).

I have tested this as much as I could -- if you can make it better, please do so!

Pete

More...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Fresh install oscmax v1.7 blank catalog index page webwolfe osCMax v1.7 Installation 4 06-20-2005 05:23 AM
Can't install Oscommerce - only one script in root directory dalglish osCommerce 2.2 Installation Help 1 01-16-2005 12:09 PM
Are there any security issues running in root? DMG osCMax v1.7 Discussion 2 01-25-2004 04:23 AM
Install in ROOT or CATALOG Folder??? Masalai osCommerce 2.2 Installation Help 6 12-29-2003 04:05 PM
root access litotes osCommerce 2.2 Modification Help 1 10-20-2003 02:51 PM


All times are GMT -8. The time now is 01:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax