Loading
0

ECshop商城程序IIS7/IIS8/IIS10下web.config伪静态规则

技术小学生微信公众号
腾讯云服务器大促销。
华为服务器
ECshop商城程序IIS7/IIS8/IIS10下web.config伪静态规则 将如下规则保存到web.config文件中,并放到网站根目录下,如已经存在有web.config文件,则只需要把<rewrite></rewrite>及中间内容复制放到<system.webServer>下面
如下伪静态规则适用于 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}&amp;brand={R:2}&amp;price_min={R:3}&amp;price_max={R:4}&amp;filter_attr={R:5}&amp;page={R:6}&amp;sort={R:7}&amp;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}&amp;brand={R:2}&amp;price_min={R:3}&amp;price_max={R:4}&amp;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}&amp;brand={R:2}&amp;page={R:3}&amp;sort={R:4}&amp;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}&amp;brand={R:2}&amp;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}&amp;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}&amp;id={R:1}&amp;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}&amp;page={R:2}&amp;sort={R:3}&amp;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}&amp;page={R:1}&amp;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}&amp;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}&amp;cat={R:2}&amp;page={R:3}&amp;sort={R:4}&amp;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}&amp;cat={R:2}&amp;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}&amp;id={R:1}&amp;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}&amp;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&amp;id={R:1}" />
                </rule>
                <rule name="auction">
                    <match url="^auction-([0-9]+).html" />
                    <action type="Rewrite" url="auction.php?act=view&amp;id={R:1}" />
                </rule>
                <rule name="exchange 0">
                    <match url="^exchange-id([0-9]+)(.*).html" />
                    <action type="Rewrite" url="exchange.php?id={R:1}&amp;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}&amp;integral_min={R:2}&amp;integral_max={R:3}&amp;page={R:4}&amp;sort={R:5}&amp;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}&amp;page={R:2}&amp;sort={R:3}&amp;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}&amp;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>

技术小学生微信公众号
华为服务器
腾讯云服务器大促销。

声明:站长码字很辛苦啊,转载时请保留本声明及附带文章链接:https://blog.tag.gg/showinfo-8-35971-0.html
亲爱的:若该文章解决了您的问题,可否收藏+评论+分享呢?
上一篇:DiscuzX3论坛IIS7/IIS8/IIS10web.config伪静态规则
下一篇:z-blog博客IIS7/IIS8/IIS10下web.config伪静态规则