IIS6中.net项目伪静态重写路径的配置方法
2014-09-05 12:58
246 查看
1、右键点击 要设置网站的网站
2、属性 ——》主目录 ——》配置——》
3、如右侧窗口,找到 .aspx 扩展名——》编辑——》复制 可执行文件的路径——》关闭
4、点击 添加——》粘贴 刚复制的 可执行文件路径
5、扩展名填写 .html (如果是 .htm 或者 任意你想要的扩展都可以 前提是以后的应用程序扩展列表里边没有该扩展)
6、不选中 确认文件是否存在
7、确定
1、参数用()括起来,使用 $1 来获得参数。
2、多个参数的时候使用&分割。
3、把Intelligencia.UrlRewriter.dll添加到bin目录
大功告成。自认为写的很详细。
2、属性 ——》主目录 ——》配置——》
3、如右侧窗口,找到 .aspx 扩展名——》编辑——》复制 可执行文件的路径——》关闭
4、点击 添加——》粘贴 刚复制的 可执行文件路径
5、扩展名填写 .html (如果是 .htm 或者 任意你想要的扩展都可以 前提是以后的应用程序扩展列表里边没有该扩展)
6、不选中 确认文件是否存在
7、确定
iis6 web.config 伪静态配置方法
1、参数用()括起来,使用 $1 来获得参数。2、多个参数的时候使用&分割。
3、把Intelligencia.UrlRewriter.dll添加到bin目录
<span class="sh_preproc" style="color: rgb(160, 32, 240);"><?xml</span> <span class="sh_type" style="color: rgb(0, 0, 255);">version</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"1.0"</span><span class="sh_preproc" style="color: rgb(160, 32, 240);">?></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><configuration></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><configSections></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><section</span> <span class="sh_type" style="color: rgb(0, 0, 255);">name</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"rewriter"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">requirePermission</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"false"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">type</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"</span><span class="sh_keyword" style="color: rgb(165, 42, 42);">/></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"></configSections></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><system.web></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><httpModules></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><add</span> <span class="sh_type" style="color: rgb(0, 0, 255);">type</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">name</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"UrlRewriter"</span><span class="sh_keyword" style="color: rgb(165, 42, 42);">/></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"></httpModules></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"></system.web></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><rewriter></span> <span class="sh_comment" style="color: rgb(255, 0, 0);"><!--首页--></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><rewrite</span> <span class="sh_type" style="color: rgb(0, 0, 255);">url</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"~/default.html$"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">to</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"~/default.aspx"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">processing</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"stop"</span><span class="sh_keyword" style="color: rgb(165, 42, 42);">/></span> <span class="sh_comment" style="color: rgb(255, 0, 0);"><!--新闻--></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><rewrite</span> <span class="sh_type" style="color: rgb(0, 0, 255);">url</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"~/news/list-([A-Za-z0-9-]*).html$"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">to</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"~/NewsList.aspx?typeUrl=$1"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">processing</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"stop"</span><span class="sh_keyword" style="color: rgb(165, 42, 42);">/></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><rewrite</span> <span class="sh_type" style="color: rgb(0, 0, 255);">url</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"~/news/list-([A-Za-z0-9-]*)-([0-9]*).html$"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">to</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"~/NewsList.aspx?typeUrl=$1&page=$2"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">processing</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"stop"</span><span class="sh_keyword" style="color: rgb(165, 42, 42);">/></span> <span class="sh_comment" style="color: rgb(255, 0, 0);"><!--新闻详细--></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"><rewrite</span> <span class="sh_type" style="color: rgb(0, 0, 255);">url</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"~/news/([A-Za-z0-9-]*).html$"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">to</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"~/NewsDetail.aspx?url=$1"</span> <span class="sh_type" style="color: rgb(0, 0, 255);">processing</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"stop"</span><span class="sh_keyword" style="color: rgb(165, 42, 42);">/></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"></rewriter></span> <span class="sh_keyword" style="color: rgb(165, 42, 42);"></configuration></span>
大功告成。自认为写的很详细。
相关文章推荐
- IIS6中.net项目伪静态重写路径的配置方法
- IIS6中.net项目伪静态重写路径的配置方法
- IIS6中.net项目伪静态重写路径的配置方法
- IIS6中.net ISAPI伪静态重写路径的配置方法
- IntelliJ IDEA 配置MAVEN后从网上GIT项目仓库路径修改方法
- 关于最近项目中配置tomcat7.0.6的多个虚拟目录路径的解决方法的记录
- .NET4.0下网站应用程序用UrlRewriter.dll重写无后缀路径 (在IIS7.5中的配置方法)
- linux服务器下部署项目修改配置使请求路径前自动加上项目名称 附 直接请求ip访问方法
- iis6伪静态重写路径的配置步骤(.net项目)
- Web项目的类库中引用WebService,在部署后动态配置WebService路径的方法
- .NET4.0下网站应用程序用UrlRewriter.dll重写无后缀路径 (在IIS7.5中的配置方法)
- 在项目中根据配置文件路径生成File对象的方法
- log4j中配置日志文件相对路径方法分析
- tomcat配置虚拟路径的4种方法
- C#获取项目程序路径的方法
- VS2005中一种获取项目可执行文件路径的方法
- log4j中配置日志文件相对路径方法
- C#获取项目程序路径的方法
- log4j中配置日志文件相对路径方法分析
- ASP.NET的URL地址重写(伪静态)示例配置