Ecshop模板网
首页 > ecshop教程 > ecshop安装使用 > ecshop的IIS7.5上的伪静态规则web.config
文章详情

ecshop的IIS7.5上的伪静态规则web.config

ecshop模板网 / 2013-12-20

ecshop的 web.config 规则

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.   <system.webServer>
  4.     <rewrite>
  5.       <rules>     
  6.         <rule name="Index" stopProcessing="true">
  7.           <match url="^index.html" />
  8.           <action type="Rewrite" url="index.php" />
  9.         </rule>
  10.         <rule name="Feed-C" stopProcessing="true">
  11.           <match url="^feed-c([0-9]+).xml" />
  12.           <action type="Rewrite" url="feed.php?cat={R:1}" />
  13.         </rule>
  14.         <rule name="Feed-B" stopProcessing="true">
  15.           <match url="^feed-b([0-9]+).xml" />
  16.           <action type="Rewrite" url="feed.php?brand={R:1}" />
  17.         </rule>
  18.         <rule name="Feed" stopProcessing="true">
  19.           <match url="^feed.xml" />
  20.           <action type="Rewrite" url="feed.php" />
  21.         </rule>
  22.         <rule name="Category6" stopProcessing="true">
  23.           <match url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
  24.           <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}" />
  25.         </rule>
  26.         <rule name="Category5" stopProcessing="true">
  27.           <match url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*).html" />
  28.           <action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&price_min={R:3}&price_max={R:4}&filter_attr={R:5}" />
  29.         </rule>
  30.         <rule name="Category4" stopProcessing="true">
  31.           <match url="^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
  32.           <action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&page={R:3}&sort={R:4}&order={R:5}" />
  33.         </rule>
  34.         <rule name="Category3" stopProcessing="true">
  35.           <match url="^category-([0-9]+)-b([0-9]+)-([0-9]+).html" />
  36.           <action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&page={R:3}" />
  37.         </rule>
  38.         <rule name="Category2" stopProcessing="true">
  39.           <match url="^category-([0-9]+)-b([0-9]+).html" />
  40.           <action type="Rewrite" url="category.php?id={R:1}&brand={R:2}" />
  41.         </rule>
  42.         <rule name="Category1" stopProcessing="true">
  43.           <match url="^category-([0-9]+).html" />
  44.           <action type="Rewrite" url="category.php?id={R:1}" />
  45.         </rule>
  46.         <rule name="Goods" stopProcessing="true">
  47.           <match url="^goods-([0-9]+).html" />
  48.           <action type="Rewrite" url="goods.php?id={R:1}" />
  49.         </rule>
  50.         <rule name="Cat3" stopProcessing="true">
  51.           <match url="^article_cat-([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
  52.           <action type="Rewrite" url="article_cat.php?id={R:1}&page={R:2}&sort={R:3}&order={R:4}" />
  53.         </rule>
  54.         <rule name="Cat2" stopProcessing="true">
  55.           <match url="^article_cat-([0-9]+)-([0-9]+).html" />
  56.           <action type="Rewrite" url="article_cat.php?id={R:1}&page={R:2}" />
  57.         </rule>
  58.         <rule name="Cat1" stopProcessing="true">
  59.           <match url="^article_cat-([0-9]+).html" />
  60.           <action type="Rewrite" url="article_cat.php?id={R:1}" />
  61.         </rule>
  62.         <rule name="Articles" stopProcessing="true">
  63.           <match url="^article-([0-9]+).html" />
  64.           <action type="Rewrite" url="article.php?id={R:1}" />
  65.         </rule>
  66.         <rule name="Brand4" stopProcessing="true">
  67.           <match url="^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
  68.           <action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}&page={R:3}&sort={R:4}&order={R:5}" />
  69.         </rule>
  70.         <rule name="Brand3" stopProcessing="true">
  71.           <match url="^brand-([0-9]+)-c([0-9]+)-([0-9]+).html" />
  72.           <action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}&page={R:3}" />
  73.         </rule>
  74.         <rule name="Brand2" stopProcessing="true">
  75.           <match url="^brand-([0-9]+)-c([0-9]+).html" />
  76.           <action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}" />
  77.         </rule>
  78.         <rule name="Brand1" stopProcessing="true">
  79.           <match url="^brand-([0-9]+).html" />
  80.           <action type="Rewrite" url="brand.php?id={R:1}" />
  81.         </rule>
  82.         <rule name="Search" stopProcessing="true">
  83.           <match url="^tag-([_0-9a-z-]+).html" />
  84.           <action type="Rewrite" url="search.php?keywords={R:1}" />
  85.         </rule>
  86.         <rule name="Snatch" stopProcessing="true">
  87.           <match url="^snatch-([0-9]+).html" />
  88.           <action type="Rewrite" url="snatch.php?id={R:1}" />
  89.         </rule>
  90.         <rule name="Group_Buy" stopProcessing="true">
  91.           <match url="^group_buy-([0-9]+).html" />
  92.           <action type="Rewrite" url="group_buy.php?act=view&id={R:1}" />
  93.         </rule>
  94.         <rule name="Auction" stopProcessing="true">
  95.           <match url="^auction-([0-9]+).html" />
  96.           <action type="Rewrite" url="auction.php?act=view&id={R:1}" />
  97.         </rule>
  98.         <rule name="Exchange5" stopProcessing="true">
  99.           <match url="^exchange-id([0-9]+).html" />
  100.           <action type="Rewrite" url="exchange.php?id={R:1}&act=view" />
  101.         </rule>
  102.         <rule name="Exchange4" stopProcessing="true">
  103.           <match url="^exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
  104.           <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}" />
  105.         </rule>
  106.         <rule name="Exchange3" stopProcessing="true">
  107.           <match url="^exchange-([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
  108.           <action type="Rewrite" url="exchange.php?cat_id={R:1}&page={R:2}&sort={R:3}&order={R:4}" />
  109.         </rule>
  110.         <rule name="Exchange2" stopProcessing="true">
  111.           <match url="^exchange-([0-9]+)-([0-9]+).html" />
  112.           <action type="Rewrite" url="exchange.php?cat_id={R:1}&page={R:2}" />
  113.         </rule>
  114.         <rule name="Exchange1" stopProcessing="true">
  115.           <match url="^exchange-([0-9]+).html" />
  116.           <action type="Rewrite" url="exchange.php?cat_id={R:1}" />
  117.         </rule>        
  118.         <rule name="Topic" stopProcessing="true">
  119.           <match url="^topic-([0-9]+).html" />
  120.           <action type="Rewrite" url="topic.php?topic_id={R:1}" />
  121.         </rule>
  122.       </rules>
  123.     </rewrite>
  124.   </system.webServer>
  125. </configuration>
复制代码

复制以上代码,重命名成web.config,放于网站根目录下,后台启用伪静态,就可用了!

下一篇: ecshop程序在nginx伪静态规则 上一篇: Ecshop上传商品图片不清晰解决办法
 用户评论(共 0 条评论)
  • 暂时还没有任何用户评论
用户名: 匿名用户 E-mail:
当前心情:
评论内容:
验证码: captcha
返回顶部 返回首页
 
QQ在线咨询
售前电话热线
#
售前QQ客服