Phil, you're correct, it's matching more than it should.
Try this:
Open
include/class.xcart_seo.php
FIND
Code:
function replaceUrl($uri){
global $xcart_web_dir;
$replacement = $uri;
extract(parse_url($replacement));
if($scheme!='ftp' && $scheme!='mailto' && $scheme!='javascript'){
if($query && preg_match('@home\.php$@i',$path)){
$gen_url = preg_replace_callback('@(.*)[&]*cat=([0-9]+)[&]*(.*)@i', array( &$this,'replaceCategoryUrl'),$query);
}
elseif($query && preg_match('@product\.php$@i',$path)){
$gen_url = preg_replace_callback('@(.*)[&]*productid=([0-9]+)[&]*(.*)@i', array( &$this,'replaceProductUrl'),$query);
}
elseif($query && preg_match('@image\.php$@i',$path)){
$gen_url = preg_replace_callback('@(.*)[&]*productid=([0-9]+)[&]*(.*)@i', array( &$this,'replaceImageUrl'),$query);
}
REPLACE WITH
Code:
function replaceUrl($uri){
global $xcart_web_dir;
$replacement = $uri;
extract(parse_url($replacement));
$path = eregi_replace($xcart_web_dir,'',$path);
if($scheme!='ftp' && $scheme!='mailto' && $scheme!='javascript'){
if($query && preg_match('@^home\.php$@i',$path)){
$gen_url = preg_replace_callback('@(.*)[&]*cat=([0-9]+)[&]*(.*)@i', array( &$this,'replaceCategoryUrl'),$query);
}
elseif($query && preg_match('@^product\.php$@i',$path)){
$gen_url = preg_replace_callback('@(.*)[&]*productid=([0-9]+)[&]*(.*)@i', array( &$this,'replaceProductUrl'),$query);
}
elseif($query && preg_match('@^image\.php$@i',$path)){
$gen_url = preg_replace_callback('@(.*)[&]*productid=([0-9]+)[&]*(.*)@i', array( &$this,'replaceImageUrl'),$query);
}
I haven't been able to test this yet, please let me know if this corrects the problem
Thanks