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

  • 相关阅读:
    使用AudioRecord录音
    使用MediaRecorder录音
    程序员不应迷失方向
    鼠标移入下划线展开 CSS3伪类
    横向滚动条,鼠标按下左右滚动!
    js遍历数组的几种方法
    前端随心记---------nodejs工具nvm.nrm.nodemen
    前端随心记-----------面试题分享
    鹅厂前端面试小题
    前端随心记-------浅谈Axios
  • 原文地址:https://www.cnblogs.com/waimaole/p/2705147.html
Copyright © 2011-2022 走看看