日期:2014-05-17 浏览次数:20515 次
<RewriterConfig> <Rules> <RewriterRule> <LookFor>~/login</LookFor> <SendTo>~/admin.aspx</SendTo> </RewriterRule> <!--<RewriterRule> <LookFor>~/index</LookFor> <SendTo>~/index.aspx</SendTo> </RewriterRule>--> <RewriterRule> <LookFor>~/reg</LookFor> <SendTo>~/reg.aspx</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/t/(.+)</LookFor> <SendTo>~/ArticleDetail.aspx?OrderIndex=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/tag/(.+)</LookFor> <SendTo>~/TageDetail.aspx?Tag=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/aboutme</LookFor> <SendTo>~/aboutme.aspx</SendTo> </RewriterRule> </Rules> </RewriterConfig> <httpHandlers> <add verb="*" path="/t/*" type="URLRewriter.RewriterFactoryHandler, URLRewriter" /> <add verb="*" path="/tag/*" type="URLRewriter.RewriterFactoryHandler, URLRewriter" /> <add verb="*" path="/login" type="URLRewriter.RewriterFactoryHandler, URLRewriter" /> </httpHandlers>
<system.webServer> <add verb="*" path="*.js" type="System.Web.StaticFileHandler"/> <add verb="*" path="*.css" type="System.Web.StaticFileHandler"/> </system.webServer>
------解决方案--------------------
web.config里加
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
------解决方案--------------------