初学urlrerite
初学urlrewrite,看了些资料,感觉挺模糊的。有几个问题。
1。我该下些什么工具。怎么去配置
2。能给个简单的例子吗? --------------------编程问答-------------------- 我想用urlrewrite实现伪静态 --------------------编程问答-------------------- 我也学习 --------------------编程问答-------------------- 利用Mircosoft URLRewriter.dll实现页面伪静态,怎么做。 --------------------编程问答-------------------- 看看这个网站,http://www.56goo.com,是用UrlRewriter来实现静态的 --------------------编程问答-------------------- 学习资料:http://blog.csdn.net/KILL_HAND/archive/2005/11/03/521748.aspx --------------------编程问答--------------------
加入一个和 aspx 页面的配置相同的扩展名项
这个具体是怎么配置啊 --------------------编程问答-------------------- 老出现这个问题
未能找到元素“RewriterConfig”的架构信息。
未能找到元素“Rules”的架构信息。
未能找到元素“RewriterRules”的架构信息。
未能找到元素“LookFor”的架构信息。
未能找到元素“SendTo”的架构信息。 --------------------编程问答-------------------- 这些写在配置文件里!不过写的时候你的位置要对!网上有例子 --------------------编程问答-------------------- 位置要对 你说准确点吗?配置文件都弄了好长时间了 总是错误 --------------------编程问答-------------------- 东西没在家里
明天还没解决的话你发个QQ给我吧:275345573 --------------------编程问答-------------------- 恩 693722929 谢了啊 --------------------编程问答-------------------- google找一下,,很多
http://www.google.com.hk/search?hl=zh-CN&source=hp&q=urlrewrite&aq=0&aqi=g10&aql=&oq=urlre&gs_rfai= --------------------编程问答--------------------
<?xml version="1.0"?>
<configuration>
<configSections >
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Default.html</LookFor>
<SendTo>~/Default.aspx</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
<compilation debug="true"/>
</system.web>
</configuration>
未能找到元素“RewriterConfig”的架构信息。
未能找到元素“Rules”的架构信息。
未能找到元素“RewriterRules”的架构信息。
未能找到元素“LookFor”的架构信息。
未能找到元素“SendTo”的架构信息。
--------------------编程问答-------------------- <httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules> --------------------编程问答-------------------- <RewriterRule>
<LookFor>~/Default\.html</LookFor>
<SendTo>~/Default.aspx</SendTo>
</RewriterRule> --------------------编程问答-------------------- 你的重写写错了 --------------------编程问答-------------------- <httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules>
这句添加到哪里啊 我第一次 --------------------编程问答-------------------- <httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules>
加到了<system.web>之间 还是报那个提示
--------------------编程问答--------------------
<?xml version="1.0"?>
<configuration>
<configSections >
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Default\.html</LookFor>
<SendTo>~/Default.aspx</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
<compilation debug="true"/>
</system.web>
</configuration>
还是同样的问题 --------------------编程问答-------------------- 为什么大家都不用.net 3.5以上版本的url重写技术呢? --------------------编程问答-------------------- 已经发到你邮箱了,可能是你的IIS配置有问题,我这边能够正常重写 --------------------编程问答-------------------- 我的也是按照这样写的,但是就是不行,也不报错,就是出不来生成的静态页面,不知道怎么回事 --------------------编程问答-------------------- 下载这个URLRewriter.dll
然后配置一下 web.config
<?xml version="1.0"?>
<configuration>
<configSections >
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/web/new/(.[\d]*).html</LookFor>
<SendTo>~/web/new.aspx?id=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
<compilation debug="true"/>
</system.web>
</configuration>
这样就把我的TestIndex.aspx ?blockid=373 重写成了 Testnew/373.html
Response.Redirect("~/web/Testnew/" + BlockID + ".html");
补充:.NET技术 , ASP.NET