Rewrite asp url as aspx url?

G

Guest

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...
 
M

Marina

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

gerry

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.
 
G

Guest

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
 
J

jasonkester

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/
 
G

gerry

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 ?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top