locked
Subdomain path relative to root application RRS feed

  • Question

  • User-1941213043 posted

    I have an application with its subdomain in my website. This is my web.config rewrite rule:

    <rule name="mubinaRule" stopProcessing="true">
              <match url="(.*)" />
                <conditions>
                  <add input="{HTTP_HOST}" pattern="^mubina.overflea.com$" />
                </conditions>
                <action type="Rewrite" url="mubina/{R:1}" />
            </rule>


    Since I did this, my paths are all messed up. For example, when I go to an Admin folder, for which you have to be logged in - it automatically redirects me to the login page. However, it does not redirect correctly: 

    http://mubina.overflea.com/mubina/lgn53.aspx?ReturnUrl=%2fadmin%2f     is what I get redirected to, instead of 

    http://mubina.overflea.com/lgn53.aspx?ReturnUrl=%2fadmin%2f

    (notice the extra /mubina)

    It is as though I am being redirected relative on the ROOT application, instead of the MUBINA application...

    I am using this method 

    http://blog.benpowell.co.uk/2010/02/winhostcom-how-to-really-run-multiple.html

    I have also tried this method

    <rule name="mub" enabled="true" stopProcessing="true">
              <match url="(.*)" />
              <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                <add input="{HTTP_HOST}" pattern="^(www\.)?mubina\.overflea\.com$" />
                <add input="{PATH_INFO}" pattern="^/overflea/($|/)" negate="true" />
              </conditions>
              <action type="Rewrite" url="/mubina/{R:0}" />
            </rule>

    But same thing occurs...

    Sunday, August 25, 2013 10:52 AM

Answers

All replies