【发布时间】:2015-06-12 16:13:38
【问题描述】:
每当我创建新产品时,Magento 会自动创建不必要的 URL 重写,包括每个类别和子类别组合,在产品路径中使用类别的 URL 键。例如,对于具有以下类别的产品 product-name:
category
category > subcategory
category > subcategory > third
...Magento 将使用以下请求路径自动创建 URL 重写:
/category/product-name
/category/subcategory/product-name
/category/subcategory/third/product-name
...以及使用请求路径创建正在使用的 URL 重写:
/product-name
我的问题是,即使我将设置 Use Categories Path for Product URLs 设置为 No 在:
System > Configuration > Catalog > Search Engine Optimizations
...如何阻止这些额外的 URL 重写被自动创建?
现在,我再次意识到该网站并未链接到网站上任何地方的这些额外路径,但如果出于某种原因搜索引擎选择了:
http://example.com/category/subcategory/third/product-name
...这将加载!我很紧张这会导致搜索引擎索引重复的内容。由于Use Categories Path for Product URLs 设置设置为No,并且网站上所有指向该产品的链接都指向:
http://example.com/product-name
...我想阻止 Magento 自动创建这些不必要的 URL 重写。
作为参考,我尝试将core_url_rewrite 表截断为零(基本上将其清空)并重新索引System > Index Management 中的目录 URL 重写。这仍然会导致 Magento 自动创建这些不必要的 URL 重写。
另外,作为参考,我使用的是 Magento Community 1.9.1。
请指教!非常感谢您的帮助。
【问题讨论】:
标签: magento url-rewriting