我发布的网站地址结尾带有.aspx,我想将它变成http://localhost:2618/aa来访问我的页面。
该怎么做?

解决方案 »

  1.   

    URL重写 可以去网上搜索现成的代码 顺便了解相关的技术。
      

  2.   

    方法多如牛毛:见http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
    Tip/Trick: Url Rewriting with ASP.NET 
      

  3.   


    <configSections>
    <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
    </configSections>
    <httpModules>
    <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter"/>
    </httpModules>
    <rewriter>

    <rewrite url="~/aa" to="~/aa.aspx" processing="stop"/>
    </rewriter>
      

  4.   

    IIS中配置url rewriter
    也可单步配置实现伪静态
    静态页面生成编码地址
    asp.net可使用Context.RewritePath
      

  5.   

    我只能想到 url重写,在全局程序变量中做,很简单的,网上搜搜就有。
      

  6.   

    可惜发布到IIS就不起作用了...
      

  7.   

    想问一下,使用URL重写,对于大量的页面,怎么自动添加新的URL重写条目?
    此外,URL重写会不会让文件过大,影响效率?
      

  8.   

    urlrewrite 或者 URLRouting影响效率倒没听说,自动添加貌似可以通过程序控制,具体的不会