免费发布信息平台(www.4008208309.com)是一个专注于免费发布信息服务的电子商务网站平台!
当前位置:免费发布信息平台 > 电脑网络 > 技术教程 > [其他] ecshop伪静态设置 经典教程

[其他] ecshop伪静态设置 经典教程

发布时间:2012-11-27 11:18   浏览:   【】【】【

折腾了半天,终于将ECSHOP伪静态功能实现了。
现在分享给大家,避免大家走弯路。
1、环境说明:Windows 2003+IIS 6.0
2、支持组件:(虚拟空间需服务商支持)
这点非常重要!首先请进入以下网址http://www.ayseo.net/xzhseo/236.html ,下载免费版的ISAPI_Rewrite组件:ISAPI_Rewrite Lite ( freeware )。
3、在ISAPI筛选器将,ISAPI_Rewrite.dll添加为Rewrite动作。
3、将以下重写规则复制到httpd.ini文件
----------------------------------URL重写规则-----------------------------------------------------
[ISAPI_Rewrite]
RewriteCond %{HTTP:Host} http://www.ximaikang.com
RewriteRule ^(.*)/index.html$ $1/index\.php
RewriteRule ^(.*)/category$ $1/index\.php
RewriteRule ^(.*)/feed-c([0-9]+).xml$ $1/feed\.php\?cat=$2
RewriteRule ^(.*)/feed-b([0-9]+).xml$ $1/feed\.php\?brand=$2
RewriteRule ^(.*)/feed.xml$ $1/feed\.php
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6&page=$7&sort=$8&order=$9
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)\.html$ $1/category\.php\?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3&page=$4&sort=$5&order=$6
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3&page=$4
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3
RewriteRule ^(.*)/category-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2
RewriteRule ^(.*)/goods-([0-9]+)(.*)\.html$ $1/goods\.php\?id=$2
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3&sort=$4&order=$5
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3
RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2
RewriteRule ^(.*)/article-([0-9]+)(.*)\.html$ $1/article\.php\?id=$2
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html $1/brand\.php\?id=$2&cat=$3&page=$4&sort=$5&order=$6
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3&page=$4
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3
RewriteRule ^(.*)/brand-([0-9]+)(.*)\.html $1/brand\.php\?id=$2
RewriteRule ^(.*)/tag-(.*)\.html $1/search\.php\?keywords=$2
RewriteRule ^(.*)/snatch-([0-9]+)\.html$ $1/snatch\.php\?id=$2
RewriteRule ^(.*)/group_buy-([0-9]+)\.html$ $1/group_buy\.php\?act=view&id=$2
------------------------------------------URL重写规则结束------------------------------------------
4、保存 httpd.ini,进入 ecshop 将 URL 重写设置为启用。
 

快速搜索 :