asp.net网站伪静态化
来源:互联网 发布:天池大数据竞赛 肺癌 编辑:程序博客网 时间:2024/05/18 00:10
第一步:引用一个dll Intelligencia.UrlRewriter.dll(不同的dll可能方法有些不同)
第二步:在web.config中配置使用伪静态
<configSections>(在configuration节点下)
<sectionname="rewriter"requirePermission="false"type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
</configSections>
第三步:在web.config中配置url的映射
<rewriteurl="~/index.htm"to="~/index.aspx"/>
不带参数的例子 url是伪静态的地址 to是实际映射到得地址
其中带参数的url映射
<rewriteurl="~/demandList-(.+).htm$"to="~/demandList.aspx?firId=$1"/>
多个参数的话前面有多个括号注意实际映射到得地址多个参数之间是用&分割的相当于&
如: <rewriteurl="~/Quotations-(.+)-(.+).htm$"to="~/Quotations.aspx?id=$1&userId=$2"/>
这样程序中就已经实现了url伪静态化
配置iis使iis支持页面伪静态化
第一步:右击网站单机”属性”=》主目录 =》配置找到扩展名为.aspx的那一行选中
点击编辑复制可执行文件里面的内容关闭这个窗口点击添加 将刚才复制的信息粘贴到可执行文件的框中扩展名写上你要使用的伪静态后缀 如 .htm .html 可以不选”确认文件是否存在”这一复选框点击确定即可
- asp.net网站伪静态化
- IIS6 配置ASP.NET网站伪静态
- asp.net网站页面转成伪静态
- ASP.NET伪静态
- ASP.NET 伪静态
- asp.net伪静态
- ASP.NET伪静态
- ASP.NET伪静态
- asp.net伪静态
- asp.net网站url伪静态重写技术的实现
- asp.net网站url伪静态重写技术的实现
- 用asp.net来实在网站URL伪静态重写
- asp.net网站静态化
- asp.net实现伪静态
- asp.net实现伪静态
- asp.net url 伪静态
- asp.net实现伪静态
- asp.net实现伪静态
- 【Nunit入门系列讲座 6】NUnit断言- 条件断言
- 关于操作access遇到的问题以及解决办法
- 必须掌握的八个【cmd 命令行】
- Application.DoEvents
- 第18周报告2:二维数组
- asp.net网站伪静态化
- jquery 结合ajax例子
- 迷你新居裝修筆記
- 解决中文输入法不可用的问题
- [收藏]2012年1月份8款主流jQuery插件推荐
- 执行SQL语句报ORA-00600 错误的解决
- C++强大背后
- Windows 下 PHP 开发环境配置系列四 - IIS+php+mysql
- 支付宝接口源代码