Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with product links after changing host


wetzel

Recommended Posts

Hi. We just changed to a new host. Now product links like this don't work anymore

 

product_info.php/products_id/330

 

 

 

However, if it is set up with a query string it does work

 

product_info.php?products_id=330

 

 

 

I have never really understood how the system resolves Get variables into a directory path.

 

Any help would be greatly appreciated.

 

Cheers!

Link to comment
Share on other sites

why don't you ask your host? that may be down to mod_rewrite or something like that (i'm just guessing at that but explain your problem to your host and see if they can fix it for you)

with ten thousand dollars we'll all be millionaires

Link to comment
Share on other sites

why don't you ask your host? that may be down to mod_rewrite or something like that (i'm just guessing at that but explain your problem to your host and see if they can fix it for you)

 

 

Thanks. I am trying them, but my experience with hosting companies has always been that they don't want to get into scripts too much. We'll see what they say.

 

I think I am getting closer. I think the problem comes down to this section of code in applications_top.php not working right:

 

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled

if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {

if (strlen(getenv('PATH_INFO')) > 1) {

$GET_array = array();

$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);

$vars = explode('/', substr(getenv('PATH_INFO'), 1));

for ($i=0, $n=sizeof($vars); $i<$n; $i++) {

if (strpos($vars[$i], '[]')) {

$GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];

} else {

$HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];

}

$i++;

}

 

if (sizeof($GET_array) > 0) {

while (list($key, $value) = each($GET_array)) {

$HTTP_GET_VARS[$key] = $value;

}

}

}

}

 

This breaks this kind of path apart into substrings and assigns them as get variables.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...