Rewrite rule to redirect subdomains to subdirectories in IIS7?

Posted by Mark Rogers on Server Fault See other posts from Server Fault or by Mark Rogers
Published on 2010-03-24T16:00:28Z Indexed on 2010/03/24 16:03 UTC
Read the original article Hit count: 509

Can someone give me an example rule, or process to create a rewrite rule, to redirect a subdomain to a subdirectory in IIS 7?

Basically I want to rewrite http://s1.site.com to http://site.com/s1/, so that the user will see s1.site.com but will actually be hitting site.com/s1/.

Specifically I'm a rewrite rookie and I want to be able to fill out the pattern, conditions, and action of the rewrite rule (basically everything) in IIS 7.

If anyone could give me a good pattern string, and a Rewrite URL string, that would solve my problem immediately.

© Server Fault or respective owner

Related posts about rewrite-rule

Related posts about regex