<outboundRules>
<!--新闻频道-->
<rule name="NEWS_EXCLUSIVEREPORT">
<!--独家报道-->
<match filterByTags="A, Area" pattern="^(.*/)news/list\.aspx\?Id=5360" />
<action type="Rewrite" value="/shtml/news/EXCLUSIVEREPORT" />
</rule>
<rule name="NEWS_STAR">
<!--明星-->
<match filterByTags="A, Area" pattern="^(.*/)news/list\.aspx\?Id=4642" />
<action type="Rewrite" value="/shtml/news/STAR" />
</rule>
</outboundRules>    // Define a custom section containing a simple element and a collection of the same element.
    // It uses two custom types: UrlsCollection and UrlsConfigElement.
    public class UrlsConfig
    {
        public static UrlsSection GetConfig()
        {
            return (UrlsSection)System.Configuration.ConfigurationManager.GetSection("CustomConfiguration");
        }
    
    }
    public class UrlsSection : ConfigurationSection
    {
        [ConfigurationProperty("urls",IsDefaultCollection = false)]
        public UrlsCollection Urls
        {
            get
            {
                return (UrlsCollection)this["urls"];
            }
        }
    }
//
//中间如何衔接……?
//
// Define the UrlConfigElementMatch.
    public class UrlConfigElementMatch : ConfigurationElement
    {
        [ConfigurationProperty("filterByTags", IsRequired = true)]
        public string filterByTags
        {
            get
            {
                return (string)this["filterByTags"];
            }
            set
            {
                this["filterByTags"] = value;
            }
        }        [ConfigurationProperty("pattern", IsRequired = true)]
        public string pattern
        {
            get
            {
                return (string)this["pattern"];
            }
            set
            {
                this["pattern"] = value;
            }
        }
    }
    // Define the UrlConfigElementaction.
    public class UrlConfigElementAction : ConfigurationElement
    {
        [ConfigurationProperty("type", IsRequired = true)]
        public string type
        {
            get
            {
                return (string)this["type"];
            }
            set
            {
                this["type"] = value;
            }
        }        [ConfigurationProperty("value", IsRequired = true)]
        public string value
        {
            get
            {
                return (string)this["value"];
            }
            set
            {
                this["value"] = value;
            }
        }
    }