如下伪静态规则适用于 ECshop 商城程序
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="index">
<match url="^index.html" />
<action type="Rewrite" url="index.php" />
</rule>
<rule name="category 0">
<match url="^category$" />
<action type="Rewrite" url="index.php" />
</rule>
<rule name="feed category">
<match url="^feed-c([0-9]+).xml$" />
<action type="Rewrite" url="feed.php?cat={R:1}" />
</rule>
<rule name="feed brand">
<match url="^feed-b([0-9]+).xml$" />
<action type="Rewrite" url="feed.php?brand={R:1}" />
</rule>
<rule name="feed type">
<match url="^feed-type([^-]+).xml$" />
<action type="Rewrite" url="feed.php?type={R:1}" />
</rule>
<rule name="feed">
<match url="^feed.xml$" />
<action type="Rewrite" url="feed.php" />
</rule>
<rule name="category 1">
<match
url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html" />
<action type="Rewrite"
url="category.php?id={R:1}&brand={R:2}&price_min={R:3}&price_max={R:4}&filter_attr={R:5}&page={R:6}&sort={R:7}&order={R:8}" />
</rule>
<rule name="category 2">
<match url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*).html" />
<action type="Rewrite"
url="category.php?id={R:1}&brand={R:2}&price_min={R:3}&price_max={R:4}&filter_attr={R:5}" />
</rule>
<rule name="category 3">
<match url="^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html" />
<action type="Rewrite"
url="category.php?id={R:1}&brand={R:2}&page={R:3}&sort={R:4}&order={R:5}" />
</rule>
<rule name="category 4">
<match url="^category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&page={R:3}" />
</rule>
<rule name="category 5">
<match url="^category-([0-9]+)-b([0-9]+)(.*).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}" />
</rule>
<rule name="category 6">
<match url="^category-([0-9]+)(.*).html" />
<action type="Rewrite" url="category.php?id={R:1}" />
</rule>
<rule name="category 7">
<match url="^category-([0-9]+)-b([0-9]+).html(.*)$" ignoreCase="false" />
<action type="Rewrite" url="category.php?{R:3}&id={R:1}&brand={R:2}" />
</rule>
<rule name="goods">
<match url="^goods-([0-9]+)(.*).html" />
<action type="Rewrite" url="goods.php?id={R:1}" />
</rule>
<rule name="article 0">
<match url="^article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html" />
<action type="Rewrite"
url="article_cat.php?id={R:1}&page={R:2}&sort={R:3}&order={R:4}" />
</rule>
<rule name="article 1">
<match url="^article_cat-([0-9]+)-([0-9]+)-(.+)(.*).html" />
<action type="Rewrite" url="article_cat.php?id={R:1}&page={R:1}&keywords={R:2}" />
</rule>
<rule name="article 2">
<match url="^article_cat-([0-9]+)-([0-9]+)(.*).html" />
<action type="Rewrite" url="article_cat.php?id={R:1}&page={R:2}" />
</rule>
<rule name="article 3">
<match url="^article_cat-([0-9]+)(.*).html" />
<action type="Rewrite" url="article_cat.php?id={R:1}" />
</rule>
<rule name="article 4">
<match url="^article-([0-9]+)(.*).html" />
<action type="Rewrite" url="article.php?id={R:1}" />
</rule>
<rule name="brand 0">
<match url="^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html" />
<action type="Rewrite"
url="brand.php?id={R:1}&cat={R:2}&page={R:3}&sort={R:4}&order={R:5}" />
</rule>
<rule name="brand 1">
<match url="^brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*).html" />
<action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}&page={R:3}" />
</rule>
<rule name="brand 2">
<match url="^brand-([0-9]+)-c([0-9]+).html(.*)$" />
<action type="Rewrite" url="brand.php?{R:3}&id={R:1}&cat={R:2}" />
</rule>
<rule name="brand 3">
<match url="^brand-([0-9]+)-c([0-9]+)(.*).html" />
<action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}" />
</rule>
<rule name="brand 4">
<match url="^brand-([0-9]+)(.*).html" />
<action type="Rewrite" url="brand.php?id={R:1}" />
</rule>
<rule name="tag">
<match url="^tag-(.*).html" />
<action type="Rewrite" url="search.php?keywords={R:1}" />
</rule>
<rule name="snatch">
<match url="^snatch-([0-9]+).html" />
<action type="Rewrite" url="snatch.php?id={R:1}" />
</rule>
<rule name="group">
<match url="^group_buy-([0-9]+).html" />
<action type="Rewrite" url="group_buy.php?act=view&id={R:1}" />
</rule>
<rule name="auction">
<match url="^auction-([0-9]+).html" />
<action type="Rewrite" url="auction.php?act=view&id={R:1}" />
</rule>
<rule name="exchange 0">
<match url="^exchange-id([0-9]+)(.*).html" />
<action type="Rewrite" url="exchange.php?id={R:1}&act=view" />
</rule>
<rule name="exchange 1">
<match url="^exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html" />
<action type="Rewrite"
url="exchange.php?cat_id={R:1}&integral_min={R:2}&integral_max={R:3}&page={R:4}&sort={R:5}&order={R:6}" />
</rule>
<rule name="exchange 2">
<match url="^exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html" />
<action type="Rewrite"
url="exchange.php?cat_id={R:1}&page={R:2}&sort={R:3}&order={R:4}" />
</rule>
<rule name="exchange 3">
<match url="^exchange-([0-9]+)-([0-9]+)(.*).html" />
<action type="Rewrite" url="exchange.php?cat_id={R:1}&page={R:2}" />
</rule>
<rule name="exchange 4">
<match url="^exchange-([0-9]+)(.*).html" />
<action type="Rewrite" url="exchange.php?cat_id={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
文章评论 本文章有个评论