Redirect Subdomain to Subdirectory using IIS Rewrite Module

Discussion in 'DNS/Domain names' started by lookitskris, Dec 28, 2010.

  1. So, I have a site ( that is a working MVC web app – no problems.

    On the root, I have a base installation of in a folder called BLOG.

    What I want to do is have the URL of “” point to and display the blog app.

    I have my domain provider pointing to the Winhost name servers and I have the subdomain of “” set up

    Using the IIS remote manager I have created the subdomain “” but it just redirects to the root MVC web app (which I guess it should as there is a problem right now)

    Using the IIS manager I have created the following rule using the URL Rewrite module:

    Input URL path after ‘/’ Matches (.*) Redirect{R:1} (Stop processing = true, entry type = local)

    {HTTP_HOST} Matches the Pattern ^$

    {REQUEST_URI} Matches the Pattern /blog

    Am I doing something wrong? As right now it is still just rerouting to the root MVC site

    I did read an article on the KB that mentioned using some custom VBScript to perform the redirect, but I couldn’t get this working and I would prefer to do it this way to keep it clean and fast.

    Thank you for any help!

    Last edited by a moderator: Oct 14, 2015
  2. Ray


    Make sure you choose Rewrite instead of Redirect as the rule.

    Then for the URL value set it to "blog/{R:0}"
  3. It is still just rerouteing to the base MVC site - this is really starting to drive me nuts!

    is there any other information I can provide that could be causing it to do this? like makybe I have something with my registrar set up wrong? It has to be something basic!

  4. Ray


    Is their a URL I can look at?

Share This Page