Rewrite asp url as aspx url?

Discussion in 'ASP .Net' started by =?Utf-8?B?VA==?=, Jul 22, 2005.

  1. Hi group,

    I'm trying to create a temporary replacement scheme for a particular url
    that gets generated all over an existing app. It would be very difficult to
    find every spot where the url gets created. So I'm thinking of doing a url
    rewrite solution where i look for the url signature at the application (or
    higher?) level. The twist is that the original url is classic asp. So how
    do I grab this asp url from a .net httpmodule (or other thing) and redirect
    the request to an aspx page? Of course you can't map .asp files to
    aspnet_isapi.dll in IIS. Can this be done?

    Thanks for any ideas...
     
    =?Utf-8?B?VA==?=, Jul 22, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?VA==?=

    Marina Guest

    Keep the original ASP page, and replace all of its code with a redirect to
    its ASPX counterpart.

    "T" <> wrote in message
    news:...
    > Hi group,
    >
    > I'm trying to create a temporary replacement scheme for a particular url
    > that gets generated all over an existing app. It would be very difficult
    > to
    > find every spot where the url gets created. So I'm thinking of doing a
    > url
    > rewrite solution where i look for the url signature at the application (or
    > higher?) level. The twist is that the original url is classic asp. So
    > how
    > do I grab this asp url from a .net httpmodule (or other thing) and
    > redirect
    > the request to an aspx page? Of course you can't map .asp files to
    > aspnet_isapi.dll in IIS. Can this be done?
    >
    > Thanks for any ideas...
     
    Marina, Jul 22, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?VA==?=

    gerry Guest

    you can map anything and everything to aspnet_isapi.dll in IIS.

    we commonly map .htm .html and .asp to aspnet_isapi.dll and rewrite the url
    when the request hits our web app.








    "T" <> wrote in message
    news:...
    > Hi group,
    >
    > I'm trying to create a temporary replacement scheme for a particular url
    > that gets generated all over an existing app. It would be very difficult

    to
    > find every spot where the url gets created. So I'm thinking of doing a

    url
    > rewrite solution where i look for the url signature at the application (or
    > higher?) level. The twist is that the original url is classic asp. So

    how
    > do I grab this asp url from a .net httpmodule (or other thing) and

    redirect
    > the request to an aspx page? Of course you can't map .asp files to
    > aspnet_isapi.dll in IIS. Can this be done?
    >
    > Thanks for any ideas...
     
    gerry, Jul 22, 2005
    #3
  4. if i set up a mapping of .asp file to aspnet_isapi, how do i handle the many
    cases where asp.dll needs to handle a request? i only want to rewrite
    certain .asp requests that match a signature i'm looking for, e.g.,
    MyPage.asp?mode=5 would be mapped to MyNewPage.aspx, whereas
    MyPage.asp?mode=4 should be processed by asp.dll.

    Here's what happened: someone wrote a GIGANTIC asp page that handles all
    sorts of stuff based on a "mode." It posts to itself and takes different
    paths based on which mode its in, i.e., update, display, etc. To add to the
    devastation, the code in question runs inside of an iframe, so I can't
    Server.Transfer or Redirect in the asp code.

    thanks

    "gerry" wrote:

    > you can map anything and everything to aspnet_isapi.dll in IIS.
    >
    > we commonly map .htm .html and .asp to aspnet_isapi.dll and rewrite the url
    > when the request hits our web app.
    >
    >
    >
    >
    >
    >
    >
    >
    > "T" <> wrote in message
    > news:...
    > > Hi group,
    > >
    > > I'm trying to create a temporary replacement scheme for a particular url
    > > that gets generated all over an existing app. It would be very difficult

    > to
    > > find every spot where the url gets created. So I'm thinking of doing a

    > url
    > > rewrite solution where i look for the url signature at the application (or
    > > higher?) level. The twist is that the original url is classic asp. So

    > how
    > > do I grab this asp url from a .net httpmodule (or other thing) and

    > redirect
    > > the request to an aspx page? Of course you can't map .asp files to
    > > aspnet_isapi.dll in IIS. Can this be done?
    > >
    > > Thanks for any ideas...

    >
    >
    >
     
    =?Utf-8?B?VA==?=, Jul 22, 2005
    #4
  5. =?Utf-8?B?VA==?=

    jasonkester Guest

    Nice. Looks like you have three options:

    1. Modify the giant SWITCH statement in MyPage.asp to redirect as
    necessary.
    2. Map .asp to aspnet_isapi and .asp2 to asp.dll. Build a webform with
    a giant SWITCH statement that redirects back to MyPage.asp2 as
    necessary.
    3. write an ISAPI filter with a giant SWITCH statement to fix the
    incoming URLs before they make it to that page.

    At any point, you could replace that switch statement with a table
    lookup if you wanted to save yourself some grief and tedium.

    Good luck!

    Jason Kester
    Expat Software Consulting Services
    http://www.expatsoftware.com/
     
    jasonkester, Jul 23, 2005
    #5
  6. =?Utf-8?B?VA==?=

    gerry Guest

    ok - you didn't mention the 'selectively' part

    in that case jason about covers the options.

    one question though - why do you say that you can't transfer or redirect
    because it is in an iframe - why should that matter ?



    "T" <> wrote in message
    news:...
    > if i set up a mapping of .asp file to aspnet_isapi, how do i handle the

    many
    > cases where asp.dll needs to handle a request? i only want to rewrite
    > certain .asp requests that match a signature i'm looking for, e.g.,
    > MyPage.asp?mode=5 would be mapped to MyNewPage.aspx, whereas
    > MyPage.asp?mode=4 should be processed by asp.dll.
    >
    > Here's what happened: someone wrote a GIGANTIC asp page that handles all
    > sorts of stuff based on a "mode." It posts to itself and takes different
    > paths based on which mode its in, i.e., update, display, etc. To add to

    the
    > devastation, the code in question runs inside of an iframe, so I can't
    > Server.Transfer or Redirect in the asp code.
    >
    > thanks
    >
    > "gerry" wrote:
    >
    > > you can map anything and everything to aspnet_isapi.dll in IIS.
    > >
    > > we commonly map .htm .html and .asp to aspnet_isapi.dll and rewrite the

    url
    > > when the request hits our web app.
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > "T" <> wrote in message
    > > news:...
    > > > Hi group,
    > > >
    > > > I'm trying to create a temporary replacement scheme for a particular

    url
    > > > that gets generated all over an existing app. It would be very

    difficult
    > > to
    > > > find every spot where the url gets created. So I'm thinking of doing

    a
    > > url
    > > > rewrite solution where i look for the url signature at the application

    (or
    > > > higher?) level. The twist is that the original url is classic asp.

    So
    > > how
    > > > do I grab this asp url from a .net httpmodule (or other thing) and

    > > redirect
    > > > the request to an aspx page? Of course you can't map .asp files to
    > > > aspnet_isapi.dll in IIS. Can this be done?
    > > >
    > > > Thanks for any ideas...

    > >
    > >
    > >
     
    gerry, Jul 24, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DDK
    Replies:
    1
    Views:
    424
    Eric Lawrence [MSFT]
    Mar 2, 2004
  2. =?Utf-8?B?amF2YXd6bA==?=

    URL Rewrite to classic ASP

    =?Utf-8?B?amF2YXd6bA==?=, Apr 29, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    3,126
    =?Utf-8?B?amF2YXd6bA==?=
    Apr 29, 2005
  3. baroque Chou

    Problems with asp.net level URL rewrite

    baroque Chou, Mar 10, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    639
    Bruce Barker
    Mar 10, 2006
  4. Martin
    Replies:
    0
    Views:
    1,273
    Martin
    Apr 28, 2010
  5. Advo

    Rewrite the URL in ASP?

    Advo, Aug 4, 2006, in forum: ASP General
    Replies:
    7
    Views:
    188
    Jeff Cochran
    Aug 6, 2006
Loading...

Share This Page