You must Sign In to post a response.
  • Category: ASP.NET

    Classic asp routing issue

    Hello All,

    I am working on classic asp project. I want to access page in directory by only typing directory and get rid off page from last.

    ex. Currently:
    Here, "demo" is directory and "efg.asp" is classic asp page.

    I want to access that "efg.asp" page by only typing following

    Something like Asp.Net MVC routing.

    Is it possible ?

    Thanks in advance
  • #768590
    Basically all the rewrite module does is to edit your web.config file. You're probably better off editing the file yourself. You'll find that it has created a section called rewrite, add the following rule
    see below snippet

    < rewrite>
    < rules>
    < rule name="My Blog">
    < match url="blog/myblog/" />
    < action type="Rewrite" url="blog/default.asp?id=19" />
    < /rule>
    < /rules>
    < /rewrite>

    NB - although you end up on a classic asp page, .net is doing the routing, so you need to have the framework enabled in your app pool. Don't use "No managed code"

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • Sign In to post your comments