应网友要求,提供Godaddy Windows主机安装ECShop伪静态规则,将web.config保存到ECShop安装的目录下。
代码如下:<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!--#RewriteBase /-->
<!--# direct one-word access-->
<rule name="1" stopProcessing="true">
<match url="^index\.html$" ignoreCase="false" />
<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}&brand={R:2}&price_min={R:3}&price_max={R:4}&filter_attr={R:5}&page={R:6}&sort={R:7}&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}&brand={R:2}&price_min={R:3}&price_max={R:4}&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}&brand={R:2}&page={R:3}&sort={R:4}&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}&brand={R:2}&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}&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}&page={R:2}&sort={R:3}&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}&page={R:2}&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}&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}&cat={R:2}&page={R:3}&sort={R:4}&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}&cat={R:2}&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}&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&id={R:1}" appendQueryString="true" />
</rule>
<rule name="26" stopProcessing="true">
<match url="^auction-([0-9]+)\.html$" ignoreCase="false" />
<action type="Rewrite" url="auction\.php\?act=view&id={R:1}" appendQueryString="true" />
</rule>
<rule name="27" stopProcessing="true">
<match url="^exchange-id([0-9]+)(.*)\.html$" ignoreCase="false" />
<action type="Rewrite" url="exchange\.php\?id={R:1}&act=view" appendQueryString="true" />
</rule>
<rule name="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}&integral_min={R:2}&integral_max={R:3}&page={R:4}&sort={R:5}&order={R:6}" appendQueryString="true" />
</rule>
<rule name="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}&page={R:2}&sort={R:3}&order={R:4}" appendQueryString="true" />
</rule>
<rule name="30" stopProcessing="true">
<match url="^exchange-([0-9]+)-([0-9]+)(.*)\.html$" ignoreCase="false" />
<action type="Rewrite" url="exchange\.php\?cat_id={R:1}&page={R:2}" appendQueryString="true" />
</rule>
<rule name="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>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
</system.webServer>
<system.web>
<customErrors mode="Off" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" />
</system.web>
</configuration>
10 条评论了已经
Trackbacks/Pingbacks
发表评论
字体为 粗体 是必填项目,邮箱地址 永远不会 被公布。
允许部分 HTML 代码:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs(网站链接)必须完整有效 (比如: http://www.chenxi.info),所有标签都必须完整的关闭。
超出部分系统将会自动分段及换行。
请保证评论内容是与日志或 Blog 内容相关的,灌水、攻击性或不恰当的评论 可能 会被编辑或删除。
有点道理
博客不错!
用config文件可以实现…
呵呵,很好很强大
很不错的博客 内容很丰富 也希望博主能够回访 大家彼此交流一下
低调的飞过
留个脚印
很强大,支持下
你好,为什么我的不行?放上去打开网站就是500错误?我的是WIN主机
我不行,500错误。。。