views:

261

answers:

1

Hi All,

What I'm trying to acheive:-

Intercept requests for .asp files using an asp.net application then re-write the url to something search engine friendly then pass the request onto the asp.dll to handle the request.

How Im trying to acheive it:-

I'm trying to get intelligencia url re-writing working for a classic asp application by

1) changing the IIS mapping for the website so that .asp extensions are handled by an asp.net application. 2) The intelligencia asp.net url re-writer then rewrites the url. 3) The requested .asp page is then forwarded to the asp.dll for processing. Can this bit be done? Any ideas?

My limitations:-

Shared hosting account so I can't install isapi filters on the server.

Does it sound like something that could be done by writing an HTTPModule?

I've considered 404 redirect instead but am concerned about google ranking problems.

Any comments , advice would be greatly appreciated.

+1  A: 

A .NET HttpModule cannot forward requests to Classic ASP in II6 because of the way the pipeline works. By the time your .NET module executes, you are in the ASP.NET handler and cannot transfer to the ASP handler.

IIS7 has the Integrated Pipeline, which would allow you to have a .NET HttpModule re-write the request to the Classic ASP handler.

You could have a custom 404 handler that clears the 404 status from the response and does a Server.Transfer or Server.Execute your page. The only thing is that you can't pass querystring parameters, so you page would need to parse the request and pull out the variables by hand.

I use a modified version of Smart404 to handle SEO friendly urls, moved files, etc. They call the feature "virtual_aliases".

Mike J
Thanks Mike. I came to the conclusion that it wouldn't work with the setup I had. Good to know I can take that avenue in IIS 7 if I need to.
Rich