Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

home page without the index.php appended


Guest

Recommended Posts

I presume that you want this to happen all the time, even if the external link points to index.php. First, add this to the .htaccess file in the root of your site:

 

#Allow rewrite rules
Options +FollowSymLinks
RewriteEngine on

# Eliminate duplicate home page
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.example.com/ [R=301,L]

The first three lines are needed only if you have not already turned on the rewrite engine. Don't duplicate these lines. And change example.com to the name of your site. Next, find this code in catalog/includes/functions/html_output.php:

	if (!tep_not_null($page)) {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
}

and delete or comment it out. Last, find this code in catalog/inclueds/filenames.php:

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

and change it to:

define('FILENAME_DEFAULT', '');

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...