我用 URLRewriter 做URL 重写... 为什么重写后,样式都认不到了...<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections> <RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/News/(.[0-9]*)\.html</LookFor>
<SendTo>~/perweb/MsgList.aspx?id=$1</SendTo>
</RewriterRule> <RewriterRule>
<LookFor>~/index.html</LookFor>
<SendTo>~/Default.aspx</SendTo>
</RewriterRule> <RewriterRule>
<LookFor>~/News/(\d{4})-(\d{2})-(\d{2})\.html</LookFor>
<SendTo>~/perweb/MsgList.aspx?year=$1&amp;month=$2&amp;day=$3</SendTo>
</RewriterRule> </Rules>
</RewriterConfig>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>

解决方案 »

  1.   

    调用样式时请用/site/style/ccs.css这种格式
    不要用相对路径
      

  2.   

    ...
    比如 http://www.abc.com/preweb/newlist.aspx?id=1
    重写为
         http://www.abc.com/News/1.html这样行不行...
    css 要怎么写
      

  3.   

    你最好写成http://www.abc.com/preweb/1.html尽量不要改变原来的目录结构 
    至于你说的那样应该行我没试过
    CSS 你原来是../style/css.css(例如)现在就要用全文路径/style/css.css