Link to home
Start Free TrialLog in
Avatar of DentonDIS
DentonDISFlag for United States of America

asked on

IIS URLRewrite

Is it possible to redirect http://server1/folder1 to http://server2/folder1 using URLRewrite if we do not have "folder1" on the server1 and we do not want to create it?
If that is possible, could you tell me to achieve it with URLRewrite?

Thanks,
Budj
Avatar of MogalManic
MogalManic
Flag of United States of America image

URLRewrite (http://www.iis.net/downloads/microsoft/url-rewrite) is an IIS module that translates this: http://mySite/article/342/some-article-title
to:
http://MySite/article.aspx?id=342&title=some-article-title.

You still have to write the article.aspx page to query the database to retrieve the article.

What you want is some sort of redirect.  You can either trap the 404 error on a custom page, or have a handler that redirects the user to the new page.

Another possibility would be to use the Server.Transfer to have the alternate URL render the page contents without having the client redirect to the other server (i.e. the client will still think you are on server1)
ASKER CERTIFIED SOLUTION
Avatar of DentonDIS
DentonDIS
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DentonDIS

ASKER

I decided to use a different way.