• zencart SEO优化之url优化:网址去掉.html


    第一步、把zencart里面 \includes\classes\seo.url.php 文件中的所有.html去掉;
    第二步、把.htaccess 文件中的.html去掉;

    例如:

    ErrorDocument 404 /page_not_found

    ##### NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:

    # For security reasons, Option followsymlinks cannot be overridden.

    #Options +FollowSymLinks

    #Options +SymLinksIfOwnerMatch

    RewriteEngine On

    RewriteBase /tabletpccheapprice/







    # From Ultimate SEO URLs

    RewriteRule ^print_page_p(.*)$ index\.php?main_page=print_page&products_id=$1&%{QUERY_STRING} [L]

    RewriteRule ^(.*)-p-(.*)$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]

    RewriteRule ^(.*)_c([0-9]+)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]

    RewriteRule ^(.*)_c([0-9]+)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]

    RewriteRule ^(.*)_c([0-9]+)/(.*)$ index\.php?main_page=index&cPath=$2&display=$3&%{QUERY_STRING} [L]

    RewriteRule ^(.*)_c([0-9]+)/(.*)/(.*)$ index\.php?main_page=index&cPath=$2&display=$3&%{QUERY_STRING} [L]

    RewriteRule ^(.*)-pi-([0-9]+)$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]

    RewriteRule ^(.*)-pr-([0-9]+)$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]

    RewriteRule ^(.*)-pri-([0-9]+)$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]

    RewriteRule ^producttags/(.*)/$ index\.php?main_page=producttags&letter=$1&%{QUERY_STRING} [L]

    RewriteRule ^producttags/(.*)/([0-9]+)$ index\.php?main_page=producttags&letter=$1&page=$2&%{QUERY_STRING} [L]

    RewriteRule ^Wholesale/(.*)-is-(.*)-sid-(.*)-ls-(.*)$ index\.php?main_page=advanced_search_result&keyword=$1&inc_subcat=$2&search_in_description=$3&categories_id=$4&%{QUERY_STRING} [L]

    RewriteRule ^Wholesale/(.*)-is-(.*)-sid-(.*)$ index\.php?main_page=advanced_search_result&keyword=$1&inc_subcat=$2&search_in_description=$3&%{QUERY_STRING} [L]

    RewriteRule ^Wholesale/(.*)$ index\.php?main_page=advanced_search_result&keyword=$1&%{QUERY_STRING} [L]

    # For Open Operations Info Manager

    RewriteRule ^(.*)-i-([0-9]+).html$ index\.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

    # All other pages

    # Don't rewrite real files or directories

    RewriteCond %{REQUEST_FILENAME} !-f [NC]

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]

    ###End Kloxo PHP config Area

  • 相关阅读:
    scala学习笔记1(表达式)
    TDD实践感悟
    Day 21:Docker 入门教程
    人类创造未来的思想先锋:这些 TED 演示深深震撼着我们
    Android开源项目第二篇——工具库篇
    提交表单
    MVC html.beginform & ajax.beginform
    MVC中的传参并在View中获取
    HTTP 教程
    ID和Name
  • 原文地址:https://www.cnblogs.com/waimaole/p/2705147.html
Copyright © 2020-2023  润新知