- Article Relate (13)
- Hide Tips (2)
- LoveSpeak (4)
- QBlog Open-Source (3)
- QBlog Publish (8)
- QBlog Template Guide (6)
- QBlog-Dev-Video (6)
- Tech Analysis (21)
- 2011-7 (2)
- Nice weblog right here! Also your site rather a lot up very fast! What host are you the usage of? Can I get your associate hyperlink in your host? I want my website loaded up as quickly as yours lol
- There is apparently a bundle to identify about this. I suppose you made some good points in features also.
- Sweet blog! I found it while searching on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I ave been trying for a while but I never seem to get there! Thank you
- Normally I don at read post on blogs, but I would like to say that this write-up very forced me to take a look at and do so! Your writing style has been amazed me. Thanks, very great post.
- This write-up contains fantastic original thinking. The informational content material here proves that issues arenaаАабТТаЂааАабТТаБТt so black and white. I feel smarter from just reading this.
- ramsen simmonds incesticide bushell sprinkler brasserie Donelle Dalila gazzara
- Sex video arabe gratuit meilleure film porno
- My brother recommended I might like this web site. He was totally right. This post truly made my day. You can not imagine just how much time I had spent for this information! Thanks!
- Wow that was odd. I just wrote an incredibly long comment but after I clicked submit my comment didn at appear. Grrrr well I am not writing all that over again. Anyhow, just wanted to say great blog!
- Thanks-a-mundo for the blog post. Really Great.
前言:
感谢大伙的支持,本次视频的发布,将发送20份源码,秋色园10份,博客园10份。
博客园在开源博客下载文章发布处留言即可。
由于本次录制的视频和内容长了许多,所以事先写好讲解文档,勉强减少了重复录制的次数。
内容简介:
1:UrlRewrite重写的基础实施,如何截取请求
2:整站的UrlRewrite重写与映射体系
3:UrlRewrite的使命:过滤、分类、映射。
如需要使用带进度条菜单控制播放,请点击:带进度条菜单观看QBlog开发者视频
下面请观看:
PS:如何开始播放:对着视频[flash]右键-》菜单中勾选“播放”和“显示全部”就开始了。
下面再附上本节讲解的基础文档:
讲解的内容
一:重写的基础实施,如何截取请求
1: UrlRewrite 继承自IHttpModule
2: web.config 配置
<httpModules>
<add name="UrlRewrite" type="CYQ.Data.UrlRewrite,UrlRewrite" />
</httpModules>
3: IIS添加的通用映射
完成这三部,就可以截取到所有访问过来的请求。
二:整站的重写与映射体系
包括两部分
1:过滤:css/js/图片等请求,直接返回了,图片这块,如果你想防盗链,你是可以放过来再处理它。
2:处理,正常的url请求,进入整站的重写与映射体系
接下来是看一下秋色园的整个Url重写的体系
无论什么请求,截取后,进行分类与映射。
示例请求:http://www.abc.com/cyqdata/article/detail/20
1:u={0} ,用户名
1:type={1},分类名称[urlType]
2:para={2},后续参数[urlPara]
3: urlref={3},来源Url
4: 根据需要扩展自己的参数
http://www.abc.com/cyqdata/article/detail/20
u=cyqdata
type=article
para=article/detail/20 ,detail/20
urlref=....当前请求的url,或者是来源url,这个根据具体应用处理
分好分类后,需要映射到相应的处理程序 ashx。
比如上刚才的示例根据article分类,映射到article.ashx
简单说,每一个请求,都会进行分类,同时有一个相应的处理程序。
具体体系与映射两括部分:
1:系统站点部分
"",为空 "home" 映射 home.ashx
error 映射 error.ashx
lang 映射 language.ashx
sys 映射 reglogin.ashx
2:用户部分
首页:http://www.cyqdata.cn/cyqdata 默认分类是"index" 映射 index.ashx
文章:http://www.cyqdata.cn/cyqdata/article 映射 article.ashx
相片:http://www.cyqdata.cn/cyqdata/photo 映射 photo.ashx
管理:http://www.cyqdata.cn/cyqdata/admin 映射 admin.ashx
其它子参数:[UrlRewrite不处理,由各ashx自行处理]
文章分类:http://www.abc.com/cyqdata/article/category/7
文章详细:http://www.abc.com/cyqdata/article/detail/20
文章档案:http://www.abc.com/cyqdata/article/list/2011/6
管理后台:
基本设置:http://www.abc.com/cyqdata/admin/setting
修改密码:http://www.abc.com/cyqdata/admin/password
...还有更多..
总结:
Url重写体系,它负责了过滤、分类、映射。