|
在window下支持ecshop伪静态化很简单,在http.ini添加如下规则:
RewriteCond %{HTTP_HOST} shop.safeidc.net 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.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 ^(.*)/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?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$
将如上规则加到http.ini中即可,其中需要注意几点: 1.规则红色部分为自己的网店域名,同时这里表示指定域名启用此规则.如果去掉,则针对全局设置. 2.此规则仅适合网店安装在根目录下,如果在子目录,根据实际来修改!
|