ecshop在IIS7下亲测可用伪静态规则web.config文件下载

SEO优化 李胜利 2018-01-11 12:51 522 0 3

  有网友反映安装ecshop系统到阿里云服务器(windows server 2008 R2)后,Ecshop网站首页可以访问,但点击内页报500错误,这获或许是你没有设置好伪静态!

     Ecshop-logo.jpg

  ecshop伪静态设置方法,伪静态其实是ecshop非常好用的一个功能,他可以提高百度收录的速度很利于seo优化!

那么如何设置ecshop伪静态呢?

  商店设置-基本设置-url重写里 勾选“简单重写”或者“复杂重写”,这里推荐用简单重写因为这样路径不会太长,对搜索引擎也更友好。

9(3).jpg

  

  设置之后确定就可以,如果出现页面打不开的情况注意一下两点:

  1,确定你的服务器已经安装re-write模块,也叫做简单重写模块,需要apache服务器支持,如果不确定问下空间商

  2,同时请确认你已经将web.config文件拷贝至网站根目录。

       这是适用于IIS7及以上的ECSHOP的伪静态规则,保存成web.config文件,放到网站根目录即可。

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>

本人亲测可用,好用的ecshop iis伪静态规则,拿去不谢!懒人可下载WINRAR.pngweb.config.rar文件,解压后,拷贝至根目录即可!(如果需要下载此文件的,请楼下留言来网盘下载密码≈≈≈!)

评论区

精彩评论