前言:官方一直没有给WIN2003用户提供ISAPI加载形式的REWRITE URL重写规则 这里我为大家提供一份,因为ECSHOP是现在是康盛旗下了,当然要与DISCUZ一种重写规则,那样才叫方便,摆脱官方的那种陈旧的URL重写规则! 希望官方转移到教程区ECRewrite ! http://bbs.ecshop.com/attachment.php?aid=6711&k=6c54ee7fb86a2a495ce4ad1f990cc2e0&t=1251826249&fid=26&sid=dd36PC%2BHd8kagqpg5oXClBpm%2Btu4gBFs57ARIECk4Q0fi0w 安装说明: 1. 将 Rewrite 拷贝到 c:/ECRewrite 2. 在IIS的Isapi上添加这个筛选器, 筛选器名称Rewrite,可执行文件选择 Rewrite.dll 3. 重新启动IIS 4. httpd.ini 是配置文件,如果您了解Rewrite 规则,可以直接对其进行编辑
[ISAPI_Rewrite] # ECSHOP RewriteRule ^(.*)/index.html$ $1/index/.php [I] RewriteRule ^(.*)/category$ $1/index/.php [I] RewriteRule ^(.*)/feed-c([0-9]+).xml$ $1/feed/.php/?cat=$2 [I] RewriteRule ^(.*)/feed-b([0-9]+).xml$ $1/feed/.php/?brand=$2 [I] RewriteRule ^(.*)/feed-type([^-]+)/.xml$ $1/feed/.php/?type=$2 [I] RewriteRule ^(.*)/feed.xml$ $1/feed/.php [I] 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 [I] 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 [I] 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 [I] RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)/.html$ $1/category/.php/?id=$2&brand=$3&page=$4 [I] RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)/.html$ $1/category/.php/?id=$2&brand=$3 [I] RewriteRule ^(.*)/category-([0-9]+)(.*)/.html$ $1/category/.php/?id=$2 [I] RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)/.html(.*)$ $1/category/.php/?$4&id=$2&brand=$3 RewriteRule ^(.*)/goods-([0-9]+)(.*)/.html$ $1/goods/.php/?id=$2 [I] RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$ $1/article_cat/.php/?id=$2&page=$3&sort=$4&order=$5 [I] RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)/.html$ $1/article_cat/.php/?id=$2&page=$3 [I] RewriteRule ^(.*)/article_cat-([0-9]+)(.*)/.html$ $1/article_cat/.php/?id=$2 [I] RewriteRule ^(.*)/article-([0-9]+)(.*)/.html$ $1/article/.php/?id=$2 [I] 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 [I] RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)/.html $1/brand/.php/?id=$2&cat=$3&page=$4 [I] RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)/.html(.*)$ $1/brand/.php/?$4&id=$2&cat=$3 [I] RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)/.html $1/brand/.php/?id=$2&cat=$3 [I] RewriteRule ^(.*)/brand-([0-9]+)(.*)/.html $1/brand/.php/?id=$2 [I] RewriteRule ^(.*)/tag-(.*)/.html $1/search/.php/?keywords=$2 [I] RewriteRule ^(.*)/snatch-([0-9]+)/.html$ $1/snatch/.php/?id=$2 [I] RewriteRule ^(.*)/group_buy-([0-9]+)/.html$ $1/group_buy/.php/?act=view&id=$2 [I] RewriteRule ^(.*)/auction-([0-9]+)/.html$ $1/auction/.php/?act=view&id=$2 [I] RewriteRule ^(.*)/exchange-id([0-9]+)(.*)/.html$ $1/exchange/.php/?id=$2&act=view [I] RewriteRule ^(.*)/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$ $1/exchange/.php/?cat_id=$2&integral_min=$3&integral_max=$4&page=$5&sort=$6&order=$7 [I] RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$ $1/exchange/.php/?cat_id=$2&page=$3&sort=$4&order=$5 [I] RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)(.*)/.html$ $1/exchange/.php/?cat_id=$2&page=$3 [I] RewriteRule ^(.*)/exchange-([0-9]+)(.*)/.html$ $1/exchange/.php/?cat_id=$2 [I] CODE:[Copy to clipboard][ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 # Protect httpd.ini and httpd.parse.errors files # from accessing through HTTP RewriteRule ^(.*)/archiver/((fid|tid)-[/w/-]+/.html)/?*(.*)$ $1/archiver/index/.php/?$2&$4 RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)/.html/?*(.*)$ $1/forumdisplay/.php/?fid=$2&page=$3&$4 RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)/.html/?*(.*)$ $1/viewthread/.php/?tid=$2&extra=page/%3D$4&page=$3&$4 RewriteRule ^(.*)/space-(username|uid)-(.+)/.html/?*(.*)$ $1/space/.php/?$2=$3&$4 RewriteRule ^(.*)/tag-(.+)/.html/?*(.*)$ $1/tag/.php/?name=$2&$3 RewriteEngine On RewriteRule ^(.*)/(list|bencandy)-([-_0-9a-zA-Z]+)/.([a-zA-Z0-9]+)$ $1/$2/.php/?stringID=$3 RewriteRule ^(.*)/([A-Z])([^//]+)/f([^//]+)/.([a-zA-Z0-9]+)$ $1/bencandy/.php/?Fid=$2$3&Id=$4 RewriteRule ^(.*)/([A-Z])([^//]+)/([^//]+)/$ $1/list/.php/?Fid=$4&zone_street=$2$3 RewriteRule ^(.*)/([A-Z])([^//]+)/$ $1/list/.php/?Fid=$2$3 |