zencart SEO优化之url优化:网址去掉.html
2012-09-27 10:18
288 查看
第一步、把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
第二步、把.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
相关文章推荐
- zencart url 去掉.HTML 后缀
- url 去掉.HTML 后缀 zencart
- dede 对文章url进行seo优化 html 静态 url 优化 seo
- 正则表达式,匹配中文字符、手机号、Email地址、网址URL、HTML标记、国内电...
- 把url后面的.html去掉
- ZENCART晚点出现 -c-.html 网址的 解决办法
- [HTML][Javascrpt]如何取得当前页面网址(URL)和查询参数
- PHPCMS V9静态化HTML生成设置及URL规则优化
- php去掉URL网址中带有PHPSESSID的配置方法
- Zencart消除SEO URL中重复的网址或者页面
- 正则表达式,匹配中文字符、手机号、Email地址、网址URL、HTML标记、国内电...
- ZENCART消除SEO URL中重复的网址/页面
- SEO优化之URL优化
- 如何去掉ZenCart网址后面的zenid=XXXX
- asp.net下URL网址重写成.html格式、RSS、OPML的知识总结
- 如何做到优化引擎搜索SEO(有HTML,关键字,Ajax,url,内容顺序等)
- PHPCMS V9静态化HTML生成设置及URL规则优化
- 如何去掉ZenCart网址后面的zenid=XXXX
- asp.net下URL网址重写成.html格式、RSS、OPML的知识总结
- zencart安装SEO URL插件后出现重复网址或页面解决办法