If you want to put your oscommerce in a subdirectory (not in root), thi code willnot work.
You should change in the file url_rewrite.php this code:
search the function transform_url
search
if ((strpos($url, 'action')) || (!$this->pages(current($url_array = explode('/', trim(ltrim($url_parts['path'], DIR_WS_HTTP_CATALOG), '/'))))))
return $url;
replace with
if ((strpos($url, 'action')) || (!$this->pages(current($url_array = explode('/', trim(str_replace(DIR_WS_HTTP_CATALOG, '', $url_parts['path']), '/'))))))
return $url;
The only change is: the function "ltrim" is not good to make this work. Replaced it with str_replace.
Form me it works, let me know ;)
bye