首页 > CMS建站 > Ecshop > 正文

ecshop的web.config格式伪静态规则

2020-06-30 22:07:58
字体:
来源:转载
供稿:网友
这篇文章主要为大家详细介绍了ecshop的web.config格式伪静态规则,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,有需要的朋友可以收藏方便以后借鉴。

这是IIS7以上版本伪静态用的规则。要注意,有时候你的网站已经有web.config了,那么只用给rewrite节点放到<system.webServer>节点内即可,不要照抄这个规则。

<?xml version=”1.0″ encoding=”UTF-8″?>

<configuration>

<system.webServer>

<rewrite>

<rules>

<rule name=”Imported Rule 1″ stopProcessing=”true”>

<match url=”^index/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”index.php” />

</rule>

<rule name=”Imported Rule 2″ stopProcessing=”true”>

<match url=”^category$” ignoreCase=”false” />

<action type=”Rewrite” url=”index.php” />

</rule>

<rule name=”Imported Rule 3″ stopProcessing=”true”>

<match url=”^feed-c([0-9]+)/.xml$” ignoreCase=”false” />

<action type=”Rewrite” url=”feed.php/?cat={R:1}” appendQueryString=”false” />

</rule>

<rule name=”Imported Rule 4″ stopProcessing=”true”>

<match url=”^feed-b([0-9]+)/.xml$” ignoreCase=”false” />

<action type=”Rewrite” url=”feed.php/?brand={R:1}” appendQueryString=”false” />

</rule>

<rule name=”Imported Rule 5″ stopProcessing=”true”>

<match url=”^feed-type([^-]+)/.xml$” ignoreCase=”false” />

<action type=”Rewrite” url=”feed.php/?type={R:1}” appendQueryString=”false” />

</rule>

<rule name=”Imported Rule 6″ stopProcessing=”true”>

<match url=”^feed/.xml$” ignoreCase=”false” />

<action type=”Rewrite” url=”feed.php” />

</rule>

<rule name=”Imported Rule 7″ stopProcessing=”true”>

<match url=”^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$” ignoreCase=”false” />

<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}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 8″ stopProcessing=”true”>

<match url=”^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)/.html$” ignoreCase=”false” />

<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}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 9″ stopProcessing=”true”>

<match url=”^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$” ignoreCase=”false” />

<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}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 10″ stopProcessing=”true”>

<match url=”^category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”category.php?id={R:1}&amp;brand={R:2}&amp;page={R:3}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 11″ stopProcessing=”true”>

<match url=”^category-([0-9]+)-b([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”category.php?id={R:1}&amp;brand={R:2}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 12″ stopProcessing=”true”>

<match url=”^category-([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”category.php?id={R:1}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 13″ stopProcessing=”true”>

<match url=”^goods-([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”goods.php?id={R:1}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 14″ stopProcessing=”true”>

<match url=”^article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”article_cat.php?id={R:1}&amp;page={R:2}&amp;sort={R:3}&amp;order={R:4}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 15″ stopProcessing=”true”>

<match url=”^article_cat-([0-9]+)-([0-9]+)-(.+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”article_cat.php?id={R:1}&amp;page={R:2}&amp;keywords={R:3}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 16″ stopProcessing=”true”>

<match url=”^article_cat-([0-9]+)-([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”article_cat.php?id={R:1}&amp;page={R:2}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 17″ stopProcessing=”true”>

<match url=”^article_cat-([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”article_cat.php?id={R:1}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 18″ stopProcessing=”true”>

<match url=”^article-([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”article.php?id={R:1}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 19″ stopProcessing=”true”>

<match url=”^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)/.html” ignoreCase=”false” />

<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}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 20″ stopProcessing=”true”>

<match url=”^brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)/.html” ignoreCase=”false” />

<action type=”Rewrite” url=”brand.php?id={R:1}&amp;cat={R:2}&amp;page={R:3}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 21″ stopProcessing=”true”>

<match url=”^brand-([0-9]+)-c([0-9]+)(.*)/.html” ignoreCase=”false” />

<action type=”Rewrite” url=”brand.php?id={R:1}&amp;cat={R:2}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 22″ stopProcessing=”true”>

<match url=”^brand-([0-9]+)(.*)/.html” ignoreCase=”false” />

<action type=”Rewrite” url=”brand.php?id={R:1}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 23″ stopProcessing=”true”>

<match url=”^tag-(.*)/.html” ignoreCase=”false” />

<action type=”Rewrite” url=”search.php/?keywords={R:1}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 24″ stopProcessing=”true”>

<match url=”^snatch-([0-9]+)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”snatch.php?id={R:1}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 25″ stopProcessing=”true”>

<match url=”^group_buy-([0-9]+)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”group_buy.php/?act=view&amp;id={R:1}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 26″ stopProcessing=”true”>

<match url=”^auction-([0-9]+)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”auction.php/?act=view&amp;id={R:1}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 27″ stopProcessing=”true”>

<match url=”^exchange-id([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”exchange.php?id={R:1}&amp;act=view” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 28″ stopProcessing=”true”>

<match url=”^exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$” ignoreCase=”false” />

<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}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 29″ stopProcessing=”true”>

<match url=”^exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”exchange.php/?cat_id={R:1}&amp;page={R:2}&amp;sort={R:3}&amp;order={R:4}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 30″ stopProcessing=”true”>

<match url=”^exchange-([0-9]+)-([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”exchange.php/?cat_id={R:1}&amp;page={R:2}” appendQueryString=”true” />

</rule>

<rule name=”Imported Rule 31″ stopProcessing=”true”>

<match url=”^exchange-([0-9]+)(.*)/.html$” ignoreCase=”false” />

<action type=”Rewrite” url=”exchange.php/?cat_id={R:1}” appendQueryString=”true” />

</rule>

</rules>

</rewrite>

</system.webServer>

</configuration>

这种规则如果没有用,有可能你的IIS不是7.X、8.X的,也有可能是服务器没有启用伪静态功能,需要联系空间商启用一下才行。不懂的可以联系我们的在线客服帮您处理。

如果是某些页面打不开,可能是程序二次开发过,要单独的增加伪静态规则。

 

《ecshop的httpd.ini格式伪静态规则》

《ecshop伪静态规则.htaccess格式》

 

以上就是ecshop的web.config格式伪静态规则的全部内容,希望对大家的学习和解决疑问有所帮助,也希望大家多多支持错新网。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选