views:

89

answers:

1

I have a classic asp webapp that I need to implement url re-writing in. I've used the intelligencia url re-writer in an asp.net application before , so my current trail of thought is to create a new asp.net application, add the url re-writing component to it and then add the classic asp application over the top. It's hosted in shared webspace so I have no ability to add isapi components to the webserver.

Is this the right way to go about it? What configuration changes would I need to make to get the classic asp and asp.net to sit together happly?

Any advice would be very appreciated.

+1  A: 

You might be able to use a 404.asp to do this. I'm running HELM on IIS6 and can use my 404.asp like this:

URLPath = LCase(Replace(Request.Servervariables("QUERY_STRING"), "404;http://" & Request.ServerVariables("SERVER_NAME") & ":" & Request.Servervariables("SERVER_PORT"), ""))

If URLPath = "/lalala" Then
    Response.Status="200 OK"
    Response.Write "La la la!"
Else
    Response.Status="404 Not Found"
    Response.Write "File not found."
End If
Oskar Akerlund
Hi Oskar. It's not the tack I'm taking at the moment, but if I fail to get a result with intelligencia url re-writer and .net then I'll try your angle. I'm not sure if the url re-writer would use the same idea under the hood, but my concerns would be if search engines looked upon it as some kind of cloaking technique. Currently I know google doesn't have a problem with the technique I'm following ... only trouble is I don't know if it will work.
Rich
@OskarHave given up persuing the angle I was taking and think your route is the best way forward. One concern is , between the time the page isn't found and the webserver serves up the custom 404, is the client (search engine or browser) made aware that the page hasn't been found and they are being redirected? Or is this part completely hidden from the client. i.e is the only status code that the client sees, what we code in the Response.status = line of the 404.asp?
Rich
The client will only recieve the status determined by this script, no extra 404 och 3XX status will be sent. At least that's how it works on my system. You can check this using this tool: http://www.seoconsultants.com/tools/headers.asp
Oskar Akerlund
With the restrictions of the orginal question, your method seems to be the best way forward. I actually managed to get the hosts to install a URL re-writer on the server, so I've now taken a more direct route.hanks for your help Oskar.
Rich