zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    JS 循环遍历json
    客户端获取ip
    jquery 常用获取值得方法汇总
    C# MATLAB混合编程
    java设计模式之抽象工厂模式学习
    java设计模式之工厂模式学习
    java设计模式之装饰者模式学习
    本周任务
    模仿jquery的data
    js中random的应用
  • 原文地址:https://www.cnblogs.com/waimaole/p/2705147.html
Copyright © 2011-2022 走看看