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

posted @ 2012-09-27 10:18  外贸乐  阅读(552)  评论(0编辑  收藏  举报