wetzel Posted August 17, 2006 Share Posted August 17, 2006 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 More sharing options...
brianstorm Posted August 17, 2006 Share Posted August 17, 2006 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 More sharing options...
wetzel Posted August 17, 2006 Author Share Posted August 17, 2006 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 More sharing options...
wetzel Posted August 17, 2006 Author Share Posted August 17, 2006 Found the problem. I needed to substitute $_SERVER['PHP_SELF'] for $PHP_SELF. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.