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 -- ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


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: 15,761
Thanks: 139
Thanked 609 Times in 521 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

*** Do not PM me requesting paid help. The only paid work I do is for AABox Web Hosting customers ***

Stay Up To Date with everything osCMax:
Free osCMax Newsletters - Security notices, New Releases, osCMax News
osCMax on Twitter - Up to the minute info as it happens. Know it first.

osCMax User Manual - osCMax Templates - Advanced Template Tutorial

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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 11:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design