app/code/core/Mage/Catalog/Model/Url.php 找到如下代码
方法getCategoryRequestPathif (null === $parentPath) { $parentPath = $this->getResource()->getCategoryParentPath($category); } elseif ($parentPath == '/') { $parentPath = ''; }
改成
//if (null === $parentPath) { //$parentPath = $this->getResource()->getCategoryParentPath($category); // } // elseif ($parentPath == '/') { $parentPath = '';//这句不用注释// }
改完后,刷新下url索引就可以了