Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

How do I redirect a subdomain to a url?

$
0
0

Trying to redirect owa.netechnical.com to https://mail.netechnical.com/owa.

This is stupid easy in cpanel, but for some reason I haven't figured it out in IIS yet, even after resorting to manually editing the web.config file. Based upon information I have found online so far I have tried:

            <rules>
                <rule name="Subdomain Redirect Attempt 1">
                    <match url=".*" />
                    <conditions>
                        <add input="{NTS Subdomain Redirects:{REQUEST_URI}}" pattern="(.+)" />
                    </conditions>
                    <action type="Rewrite" url="{C:1}" appendQueryString="false" />
                </rule>


             <rule name="Subdomain Redirect Attempt 2" enabled="true">
                    <match url="(.*)" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                          <add input="{HTTP_HOST}" pattern="^(www\.)?owa\.netechnical\.com$" ignoreCase="false" />
                    </conditions>
                    <action type="Redirect" url="https://mail.netechnical.com/owa"  redirectType="Permanent" />           
              </rule>


        <rule name="Subdomain Redirect Attempt 3" patternSyntax="ECMAScript" stopProcessing="true">
                <match url=".*" />
               <conditions logicalGrouping="MatchAny">
                <add input="{HTTP_HOST}" pattern="^(owa.)?netechnical.com$"/>
                </conditions>
                <action type="Redirect" url="https://mail.netechnical.com/owa/" />
        </rule>
            </rules>

All to no avail. Any ideas as to how to implement this? Any help will be greatly appreciated.

Thanks,

Shaun


Viewing all articles
Browse latest Browse all 2482

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>