惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Visual Studio Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
小众软件
小众软件
L
LangChain Blog
Cyberwarzone
Cyberwarzone
美团技术团队
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
V
V2EX
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
L
LINUX DO - 最新话题
Recent Announcements
Recent Announcements
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
aimingoo的专栏
aimingoo的专栏
人人都是产品经理
人人都是产品经理
F
Full Disclosure
V2EX - 技术
V2EX - 技术
The Cloudflare Blog
博客园 - 叶小钗
T
Threat Research - Cisco Blogs
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Latest news
Latest news
S
Security @ Cisco Blogs
Spread Privacy
Spread Privacy
Project Zero
Project Zero
K
Kaspersky official blog
MyScale Blog
MyScale Blog
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
博客园 - 【当耐特】
Hacker News - Newest:
Hacker News - Newest: "LLM"
大猫的无限游戏
大猫的无限游戏
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Webroot Blog
Webroot Blog
罗磊的独立博客
Vercel News
Vercel News
N
News and Events Feed by Topic
A
Arctic Wolf
C
CERT Recently Published Vulnerability Notes

博客园 - 痞子再

介绍50个 WordPress 动作挂钩 决定如何开发你的WordPress主题框架 WordPress 主题框架是如何工作的 WordPress主题制作教程[壹] - 了解WP&结构&索引 jQuery UI Datepicker -- jQuery日历控件中的精品(UI绚丽) godaddy.com免费10G空间申请步骤详解 godaddy免费空间完美安装部署dedecms google的CDN内容分发网络来加载jQuery库 - 痞子再 - 博客园 压缩和解压缩的方法 from Byte[] 利用google API实现全文翻译的Web Service JavaScript模拟进度条 字符串操作类 NET代码积累之一 让visual studio 2005 自动为类加版权 C#日期格式化 UrlRewriter 使用详解 (Friendly Url) web.config中配置字符串中特殊字符的处理 - 痞子再 - 博客园 漂浮层广告代码[层为隐藏,点击广告后层消失][24小时/次] 网页采集时,常用的几种正则表达式 C# Check is No number - 痞子再
UrlRewriter使用详解 - 痞子再 - 博客园
痞子再 · 2010-03-17 · via 博客园 - 痞子再

西门子一级代理商

看到网上很多人在关于UrlRewriter上花了很多时间,其实很简单,无外呼也就两种方法.
1.下载UrlRewriter.DLL组件
    IIS服务器上,也有很多商业的ISAPI 筛选器模块可供使用
2.利用.NET的自带的类实现
   

    首先设置WebConfig中的内容

 1<?xml version="1.0"?>
 2<configuration>
 3    <configSections>
 4    <section name="CustomConfiguration" type="URLRewriter.Config.UrlsSection, URLRewriter" />
 5  </configSections>
 6
 7  <CustomConfiguration>
 8    <urls>
 9      <add virtualUrl="~/list/(\d+)" destinationUrl="~/default.aspx?list=$1" />
10      <add virtualUrl="~/list/(\d+)/" destinationUrl="~/default.aspx?list=$1" />
11      <add virtualUrl="~/list/(\d+)/index.html" destinationUrl="~/default.aspx?list=$1" />
12      <add virtualUrl="~/word/(\d+)/index.html" destinationUrl="~/default.aspx?word=$1" />
13      <add virtualUrl="~/list/(.*)/word/(.*)/index.html" destinationUrl="~/default.aspx?list=$1&amp;word=$2" />
14   
15      <add virtualUrl="~/microsoft*.*" destinationUrl="~/default.aspx" />
16      <add virtualUrl="~/microsoft*" destinationUrl="~/default.aspx" />
17      <add virtualUrl="~/m/i/c/rosoft.aspx" destinationUrl="~/default.aspx" />
18      <add virtualUrl="~/m/i/c/*" destinationUrl="~/default.aspx" />
19    </urls>
20  </CustomConfiguration>
21
22    <system.web>
23        <httpModules>
24            <add type="URLRewriter.RewriterModule, URLRewriter" name="RewriterModule"/>
25        </httpModules>
26        <authentication mode="Forms"/>
27    </system.web>
28</configuration>

拷贝 UrlRewriter_bin 重写类 中的DLL 到BIN文件夹内

使用相当方便
URL: http://localhost:2064/list/1.1/word/2.33/index.html

 /list/1.1/word/2.33/index.html
第0个Key=list,value=1.1;第1个Key=word,value=2.33;