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

推荐订阅源

Google Online Security Blog
Google Online Security Blog
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
W
WeLiveSecurity
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
博客园 - 司徒正美
雷峰网
雷峰网
L
LINUX DO - 最新话题
博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
The Last Watchdog
The Last Watchdog
V2EX - 技术
V2EX - 技术
S
Security Affairs
有赞技术团队
有赞技术团队
月光博客
月光博客
T
Threatpost
T
Tor Project blog
O
OpenAI News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V
V2EX
Know Your Adversary
Know Your Adversary
Project Zero
Project Zero
博客园 - 三生石上(FineUI控件)
D
Docker
AWS News Blog
AWS News Blog
AI
AI
P
Proofpoint News Feed
K
Kaspersky official blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security
www.infosecurity-magazine.com
www.infosecurity-magazine.com
S
Securelist
F
Fortinet All Blogs
F
Full Disclosure
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
量子位
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Palo Alto Networks Blog
Cyberwarzone
Cyberwarzone
Cisco Talos Blog
Cisco Talos Blog
美团技术团队
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog

博客园 - 痞子再

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