PrestaShop 1.7.x. 如何启用和管理SEO&URLs
February 20, 2017
本教程将指导您如何启用和管理 SEOprestshop中-友好的url.7.x.
默认情况下,PrestaShop的深度url(即特定页面而不是在线) domain 名称)对客户和客户来说都是相当缺乏信息的 search engines: a URL such as http://www.myprestashop.com/product.php?id_product=27 不能帮助访问者了解该页面上有什么产品. 友好的url是实现这一目标的方法,例如get http://www.myprestashop.com/2-music-players/27-ipod-nano-green. 正如您在上面的第二个示例中看到的那样, 类别和产品都可以有一个友好的URL:在上面的例子中, id_category=2 becomes 2-music-players, and id_product=27 becomes 27-ipod-nano-green. 而ID号默认不能删除, 这些词可以从类别/产品名称中生成, or written by hand. 这可以直接在产品或类别的配置页面中完成(在Catalog菜单中):“友好URL”字段可以直接在类别的主配置页面和“SEO” tab 产品配置页面的.
友好URL仅适用于支持URL重写的服务器设置(通过 Apache Web Server mod_rewrite feature, for instance). 一定要检查你的服务器是否询问你的 hosting provider!), 因为如果您启用友好的url而服务器不支持它,则可能使您的商店对客户完全不可用!
In order to enable SEO-friendly URLs
Login to your PrestaShop admin panel.
Open the CONFIGURE > Shop Parameters > Traffic section.
Scroll down to Set up URLs section and find Friendly URL. Change this option to YES 如果您知道您的服务器支持URL重写.
Accented URL. PrestaShop能够为非ascii名称的产品生成带有特殊字符的URL. 你可以在这里禁用这个选项.
Redirect to Canonical URL. 一个PrestaShop页面可以有很多url, 最常见的情况是需要考虑参数:例如, http://example.com/product.php?id=5&option1 and http://example.com/product.php?id=5&选项2指向相同的产品,只有一个区别. 因为你希望你的产品有一个单一的URL,而不是许多重复的, 您应该启用规范url. 规范url是一种消除自我创建的重复内容的方法-这可能会大大降低你的搜索引擎排名, as this is considered spam. To avoid search engines 认为你是垃圾邮件他们的索引, PrestaShop使用标准的rel= " canonical "链接标签来指示哪个是给定内容的一个基本URL. 虽然强烈建议启用此选项, it also depends on your theme actually implementing correctly the header tag. 向主题设计师询问更多信息. There are three options:
No redirection. 您可能会得到重复的url.
301 Move Permanently. Returns the HTTP 301状态码,指向主URL并通知 search engines 这是唯一要考虑的URL.
302 Moved Temporarily. Returns the HTTP 302状态码,指向主URL并通知 search engines 主URL稍后可能会更改.
Disable Apache’s MultiViews option. Apache 是最受欢迎的网络服务器,也是你的网站主机最可能使用的服务器(尽管你应该自己检查一下). Multiviews是一个内容协商系统:当启用时, web服务器试图以它认为最匹配的语言版本向用户提供页面, under the same URL. 不幸的是,这可能会给PrestaShop的友好url特性带来麻烦. 如果是这种情况,您可以尝试使用此选项禁用多视图.
Disable apache mod security. mod_security is a module of the Apache Web服务器,它充当 firewall,保护您的服务器免受入侵. 但是,它可能会阻塞一些关键特性,甚至在某些配置中产生错误. 在这种情况下,禁用它 firewall here.
看看我们的各种各样的 PrestaShop templates!
请随时查看下面的详细视频教程:
PrestaShop 1.7.x. 如何启用和管理SEO&URLs