1

I'm modifying a website made with osCommerce (I didn't make this website), and one of the things I have to modify is the look of the home page. My problem is that I have modified the index.php file, and all the changes look fine.

However, when I click a link that has been written in PHP with this function:

<?php echo tep_href_link(FILENAME_DEFAULT,'cPath=24&sort=2a') ?>

(In /includes/filenames.php I have define('FILENAME_DEFAULT', 'index.php');.)

What happens is that it shows the correct results, but in a different page, with the old design. I don't understand it, because that link should take me to the same index.php that I modified, but obviously it's taking me somewhere else.

I don't know what page is it showing, the only thing I see is the link written by the PHP function:

(my_catalog_folder)/escaparate-c-24.html?sort=2a&osCsid=p7fp55t489nv042p0ip4mp7si1

I guess that the tep_href_link() is writing that, but I don't know what page is using to show the results.

Any clues would be much appreciated!

random
  • 9,774
  • 10
  • 66
  • 83
Albert R
  • 125
  • 5
  • 19

1 Answers1

0

This is expected behaviour if the store has the SEO URLs module installed.

Look in the .htaccess file and you should spot this line:

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

Any and all requests for a category will be rewritten in a friendlier URL string like the one you noted.

As to the use of the older design, double-check the real file being called with an echo out of the $_SERVER["PHP_SELF"]; or $_SERVER["SCRIPT_NAME"]; and make sure the filename and path is correct.

Drop that into a file like includes/application_top.php before the final lines (or the closing ?> if you still have that there):

echo $_SERVER["SCRIPT_NAME"];

It may also be due to caching of the pages. Check to see if there a cache module installed as well.

random
  • 9,774
  • 10
  • 66
  • 83
  • Thank you very much for your reply! I think I figured out where the problem was (thanks to you): in the **.htaccess**. I had this in mine: `RewriteBase /`, a then I changed it to `RewriteBase /sub_folder/`, since the new website is in a subfolder instead of being in the root of the server. Now it seems to work! I hope that I didn't mess up something else for changing that... do you think that could happen? Thank you very much again! – Albert R Mar 15 '11 at 02:16
  • It'll be fine with your edit. Nothing should break so long as you don't have other files using the same syntax expected by osCommerce @alb – random Mar 15 '11 at 02:41