Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to configure our IIS server so that when an old page is requested such as http://mycompany.com/details.asp?item_id=1111 it should redirect to http://mycompany.com/items/1111

I'm not sure which is the best way to do this? 1. In the web.config file of the project... but I'm not sure this caters for variables 2. MetaBase... we're trying this at the moment using VBScript, but having problems since we're very new to it 3. Other?

Any help would be great.

Thanks Jacques

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

Your best bet in IIS6 is ISAPI Rewrite. It's meant for this exact situation. When you move to IIS7, there's built in support with URL Rewrite.

Edit: Since this is IIS6, web.config won't be able to redirect a .asp page (non-managed code) unless you map .asp to aspnet_isapi.dll instead of asp.dll (but then it won't process the pages the same). So IIS6 can't cleanly natively do this by itself.

What you can do is in your details.asp page watch for item_id=something and do a Response.redirect.

Or you can do this in global.asa Application_BeginRequest if you want it more generic and for multiple pages.

share|improve this answer
    
We're not able to upload a 3rd party rewrite module for this. We'd have to rely on the Metabase, or similar scenario where the functionality already exists. –  Jacques Sep 15 '11 at 14:32
    
I'll reply to this by editing my original post ... –  Scott Forsyth - MVP Sep 16 '11 at 15:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.