ecshop伪静态万网规则

2016-07-07 15:16 来源:www.chinab4c.com 作者:ecshop专家

购买的万网G1 虚拟主机,要怎么写伪静态规则呢?

G享主机URLREWRITE手册UrlRewrite技术已经被广泛使用,为了方便用户操作,我们提供了相关的使用手册,目前提供了ASP、ASP.NET、PHP脚本的测试样例,供用户参考。

感谢您长期对万网的关注和支持!

UrlRewrite使用手册下载


http://www.net.cn/service/ziliao/cpsc/200905/3784.html

配置完毕后,将伪静态上传后,在后台开启后台的 简单重写
本人已写好了规则,已测试无误。
现将规则与大家共享下
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="1" stopProcessing="true">
<match url="^index\.html$" ignoreCase="true" />
<action type="Rewrite" url="index.php" />
</rule>
<rule name="2" stopProcessing="true">
<match url="^category$" ignoreCase="false" />
<action type="Rewrite" url="index.php" />
</rule>
<!--# access any object by its numeric identifier-->
<rule name="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="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="5" stopProcessing="true">
<match url="^feed-type([^-]+)\.xml$" ignoreCase="false" />
<action type="Rewrite" url="feed.php?type={R:1}" appendQueryString="false" />
</rule>
<rule name="6" stopProcessing="true">
<match url="^feed\.xml$" ignoreCase="false" />
<action type="Rewrite" url="feed.php" />
</rule>
<rule name="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="23" stopProcessing="true">
<match url="^tag-(.*)\.html" ignoreCase="false" />
<action type="Rewrite" url="search.php\?keywords={R:1}" appendQueryString="true" />
</rule>
<rule name="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="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>
配置文件webconfig下载地址
http://www.zhuoego.com/bbs/forum.php?mod=viewthread&tid=237

回答:
学习了。 万网伪静态。

楼主我的编码是GBK的 你这个是utf-8的 怎么办呢?

用过表示问题的确很多, 设置非常繁琐, 头疼啊