URL重写
来源:互联网 发布:橡胶木与橡木区别 知乎 编辑:程序博客网 时间:2024/05/01 21:55
一、URL重写
本URL重写是采用URLRewriter类库,然后在Web.config是配置相关节点,页面中不需要任何代码即可完成。本项目下载中包含URLRewriter类库,并含有源代码,想学习URL重写的可以学习一下。
Web.config中的节点配置:
<?xml version="1.0"?><configuration> <configSections> <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/> </configSections> <RewriterConfig> <Rules> <RewriterRule> <LookFor>~/123456.do</LookFor> <SendTo>~/Request.aspx</SendTo> </RewriterRule> </Rules> </RewriterConfig> <system.web> <compilation debug="false" targetFramework="4.0" /> <httpModules> <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/> </httpModules> </system.web> </configuration>
页面调用:
protected void Button1_Click(object sender, EventArgs e) { Response.Redirect("123456.do"); }
运行效果图:
本项目下载地址:http://download.csdn.net/detail/lovegonghui/9249395
项目中关于IIS配置的文件夹作者是:蓝必照
0 0
- url重写
- URL重写
- URL重写
- Url重写
- URL重写
- url重写
- URL重写
- url重写
- URL 重写
- url重写
- URL重写
- URL重写
- url重写
- URL重写
- url 重写
- url重写
- url重写
- URL重写
- HP-VB
- oracle查询结果保存为xml
- 正则表达式祥解
- UIScrollView的代理(delegate)
- 欢迎使用CSDN-markdown编辑器
- URL重写
- 基于Qt的FreeType字体轮廓解析
- Begin
- 使用sdl播放音频流
- 汇编语言_标志位介绍
- 【工作感悟】——xyb项目部署
- 初步学习JAVA网络编程
- 关于OPC自动化接口编程(OPCDAAuto.dll)几点注意问题
- VBScript