Categories

Featured templates

PrestaShop 1.6.x. 如何启用和使用seo友好的网址

Eva Fox March 2, 2015
Rating: 4.7/5. From 3 votes.
Please wait...

本教程将指导您如何启用和使用 SEO-friendly URLs in PrestaShop 1.6.x.

PrestaShop 1.6.x. 如何启用和使用seo友好的网址

默认情况下,PrestaShop的深度url(即特定页面而不是在线) domain 名称)对客户和客户来说都是相当缺乏信息的 search engines: an 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.

As you can see in the example above, 类别和产品都可以有一个友好的URL:在上面的例子中, id_category=2 becomes 2-music-players, and id_product=27 becomes 27-ipod-nano-green. 而ID号默认不能删除, 这些词可以从类别/产品名称中生成, or written by hand. 这可以直接在产品或类别的配置页面中完成(在Catalog菜单中):“Friendly URL”字段可以直接在类别的主配置页面中找到, and under the “SEOtab 产品配置页面的.

在您的PrestaShop安装中还有其他个人页面肯定会从友好的url中受益: CMS 页面、用户帐户页面、自动生成内容的页面……SEO & “url”页向您展示了这些页面的列表, 并使您能够编辑他们的友好url以及他们的 meta tags (title, description, keyword).

友好URL仅适用于支持URL重写的服务器设置(通过 Apache Web Server mod_rewrite feature, for instance). 一定要检查你的服务器是否询问你的 hosting provider!), 因为如果您启用友好的url而服务器不支持它,则可能使您的商店对客户完全不可用!

为了设置url,您需要遵循以下步骤:

  1. Log into your PrestaShop admin panel.

  2. Navigate to Preferences -> SEO and URLs:

    PrestaShop 1.6.x. 如何启用和使用SEO友好的URLs_1

  3. Friendly URL. Change this option to “YES” 如果您知道您的服务器可以支持URL重写.

    • 您可能会看到诸如“URL重写(mod_rewrite)在您的服务器上没有活动,或者无法检查您的服务器配置. 如果你想使用友好的url,你必须激活这个mod。. 在这种情况下,PrestaShop无法检测到您的服务器设置, 但这并不意味着该功能不能工作. You must test it yourself.

  4. Accented URL. PrestaShop现在可以为非ASCII名称的产品生成带有特殊字符的URL. You can disable that option here.

  5. Redirect to Canonical URL. 给定的PrestaShop页面可以有许多url,最常见的情况是需要考虑参数. For instance, http://example.com/product.php?id=5&option1 and http://example.com/product.php?id=5&Option2指向同一个产品,只有一个区别. 因为你希望你的产品有一个单一的URL,而不是许多重复的, you should enable Canonical URLs.
    规范url是一种消除自我创建的重复内容的方法-这可能会大大降低你的搜索引擎排名, as this is considered spam. To avoid search engines 认为你是垃圾邮件他们的索引, PrestaShop使用标准的rel= " canonical "链接标签来指示哪个是给定内容的一个基本URL.
    虽然强烈建议启用此选项, it also depends on your theme implementing correctly the header tag. 向主题设计师询问更多信息.
    There are three options:

    • No redirection. You might get duplicate URLs.

    • 301 Move Permanently. Returns the HTTP 301状态码,指向主URL并通知 search engines 这是唯一要考虑的URL.

    • 302 Moved Temporarily. Returns the HTTP 302状态码,指向主URL并通知 search engines that the main URL might change later.

  6. Disable apache multiviews. Apache is the most popular web server, 并且最有可能是你的网站主机使用的(尽管你应该自己检查一下). Multiviews是一个内容协商系统:当启用时, web服务器试图以它认为最匹配的语言版本向用户提供页面, under the same URL. 不幸的是,这可能会给PrestaShop的友好url特性带来麻烦. 如果是这种情况,您可以尝试使用此选项禁用多视图.

  7. Disable apache mod security. mod_security is an Apache server module which acts as a firewall,保护您的服务器免受入侵. 但是,它可以阻止一些关键特性,甚至在某些配置中产生错误. In such case, disable that firewall here.

    PrestaShop 1.6.x. 如何启用和使用SEO友好的URLs_2

请随时查看下面的详细视频教程:

PrestaShop 1.6.x. 如何启用和使用seo友好的网址

Prestashop Themes
This entry was posted in PrestaShop Tutorials and tagged link, Prestashop, seo, url. Bookmark the permalink.

Submit a ticket

如果您仍然无法找到关于您的问题的足够的教程,请使用以下链接向我们的技术支持团队提交请求. 我们将在接下来的24小时内为您提供我们的帮助和协助: Submit a ticket