zencart在IIS6 下isapi_rewrite 的 SEO问题

用于收藏精华贴子、网友共享的资料等。可以回复,不能发新贴。

版主: Jack

版面规则
本版面不能发新贴,可以回复

zencart在IIS6 下isapi_rewrite 的 SEO问题

帖子zrlister » 2007-01-23 22:40

商城地址:http://www.guolaiba.com
网上找一下,比较少的讨论这个问题的,搜到的最多的贴子就是本论坛的这篇
http://www.zen-cart.cn/forum/viewtopic.php?t=1280&f=1&p=5672

我按照方法A做几乎是可以的,但还有几个问题存在,第一个是无法登陆,第二个是商品评论打不开,应该是重定向错误。暂时就发现这些问题,大家可以再帮忙试一下,或者高人有没有写好的httpd.ini共享一下给大家。

附我的httpd.ini

#----------------- httpd.ini 文件内容,您可以复制后上传到您网站根目录-----------
[ISAPI_Rewrite]
# 3600 = 1 hour 设置缓存时间 1个小时
CacheClockRate 3600
# 设置正则表达式 替换变量个数.
RepeatLimit 32

RewriteRule ^(.*)-p-(.*).html /index\.php\?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-(.*).html /index\.php\?main_page=index&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-m-([0-9]+).html /index\.php\?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+).html /index\.php\?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+).html /index\.php\?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+).html /index\.php\?main_page=product_reviews_info&products_id=$2&%{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]
# For dreamscape''s News & Articles Manager
RewriteRule ^news/?$ index\.php\?main_page=news&%{QUERY_STRING} [L]
RewriteRule ^news/rss.xml /index\.php\?main_page=news_rss&%{QUERY_STRING} [L]
RewriteRule ^news/archive/? /index\.php\?main_page=news_archive&%{QUERY_STRING} [L]
RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html /index\.php\?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]
RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html /index\.php\?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]
RewriteRule ^news/(.*)-a-([0-9]+)-comments.html /index\.php\?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]
RewriteRule ^news/(.*)-a-([0-9]+).html /index\.php\?main_page=news_article&article_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 ^(.*).html /index\.php\?main_page=$1&%{QUERY_STRING} [L]
RewriteRule ^(.*).html(\?.*)? /index\.php\?main_page=$1&$2 [L
zrlister
新手上路
新手上路
 
帖子: 10
注册: 2007-01-23 22:25

Re: zencart在IIS6 下isapi_rewrite 的 SEO问题

帖子zrlister » 2007-01-24 11:49

已经完美解决,下面是我的httpd.ini
其实每行最后面的%{QUERY_STRING}是没有一点儿用处的,
这也是apache rewrite mod和ispai_rewrite的不同,如果想把它改为isapi_rewrite兼容的,可以参照我提供的httpd.ini的最后一行改改.

#----------------- httpd.ini 文件内容,您可以复制后上传到您网站根目录-----------
[ISAPI_Rewrite]
# 3600 = 1 hour 设置缓存时间 1个小时
CacheClockRate 3600
# 设置正则表达式 替换变量个数.
RepeatLimit 32
RewriteRule ^(.*)-p-(.*).html(\?)?(.*)? /index\.php\?main_page=product_info&products_id=$2&$4 [L]
RewriteRule ^(.*)-c-(.*).html(\?)?(.*)? /index\.php\?main_page=index&cPath=$2&$4 [L]
RewriteRule ^(.*)-m-([0-9]+).html(\?)?(.*)? /index\.php\?main_page=index&manufacturers_id=$2&$4 [L]
RewriteRule ^(.*)-pi-([0-9]+).html(\?)?(.*)? /index\.php\?main_page=popup_image&pID=$2&$4 [L]
RewriteRule ^(.*)-pr-([0-9]+).html(\?)?(.*)? /index\.php\?main_page=product_reviews&products_id=$2&$4 [L]
RewriteRule ^(.*)-pri-([0-9]+).html(\?)?(.*)? /index\.php\?main_page=product_reviews_info&products_id=$2&$4 [L]
# For Open Operations Info Manager
RewriteRule ^(.*)-i-([0-9]+).html(\?)?(.*)? /index\.php\?main_page=info_manager&pages_id=$2&$4
# For dreamscape''s News & Articles Manager
RewriteRule ^news/?$ index\.php\?main_page=news& [L]
RewriteRule ^news/rss.xml /index\.php\?main_page=news_rss& [L]
RewriteRule ^news/archive/? /index\.php\?main_page=news_archive& [L]
RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html(\?)?(.*)? /index\.php\?main_page=news&date=$1-$2-$3&$5 [L]
RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html(\?)?(.*)? /index\.php\?main_page=news_archive&date=$1-$2&$4 [L]
RewriteRule ^news/(.*)-a-([0-9]+)-comments.html(\?)?(.*)? /index\.php\?main_page=news_comments&article_id=$2&$4 [L]
RewriteRule ^news/(.*)-a-([0-9]+).html(\?)?(.*)? /index\.php\?main_page=news_article&article_id=$2&$4 [L]
# All other pages
# Don''t rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).html(\?)?(.*)? /index\.php\?main_page=$1&$3 [L]
过来吧网上批发市场
http://www.guolaiba.com
zrlister
新手上路
新手上路
 
帖子: 10
注册: 2007-01-23 22:25

Re: zencart在IIS6 下isapi_rewrite 的 SEO问题

帖子Jack » 2007-01-25 12:11

谢谢分享!
Zen Cart - 让每个人拥有自己生意的梦想成真
加入Zen Cart地图 | 恕不回复站内短信提问 | QQ: 3171061
头像
Jack
论坛版主
论坛版主
 
帖子: 12265
注册: 2004-12-16 10:04


  • 相关话题
    回复总数
    阅读次数
    最新文章

回到 精华共享



在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客