最近空间不太稳定老板要把java的空间换成asp.net的,但是那些好多jsp文件还不能改名字,如果在java里面配置非常规名字(比如http://localhost/abc/,abc/其实是个java写的类和jsp作用一样)可以配置web.xml中的servlet-mapping达到目的。不知道在asp.net中需要怎么配置,或者能不能有一种变通的方法,比如在所有服务器请求传递过来的时候不管请求路径或者页面是哪个都经过一个validate.aspx页面做处理然后再分发请求给各个aspx页面也就是比如访问地址是http://localhost/a.jsp实际没有这个文件,而实际访问的是http://localhost/a.aspx.请高手指教
</configSections>
<RewriterConfig>
<Rules>
<!--地址重写规则-->
<!--首页,定位到静态页面-->
<RewriterRule>
<Type>Static</Type>
<LookFor>~/Default\.aspx</LookFor>
<SendTo>~/Default.htm</SendTo>
</RewriterRule>
<!--二级页面,定位到动态页面-->
<RewriterRule>
<Type>Dynamic</Type>
<LookFor>~/List\.aspx</LookFor>
<SendTo>~/Show.aspx</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<!-- RUL重写结束 -->
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections> <RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(.*)</LookFor>
<SendTo>~/default.aspx?page=$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" />
</httpHandlers>-->
<compilation debug="true"/>
<customErrors mode="Off"/>
</system.web></configuration>