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

simple question

$
0
0

I continue to find this elegant iis snippet a real help from here: https://caduceus.me/2HDpWha which provide www removal, https rewrite of all domains, pointing to your main webiste. I have a question, I'm wondering if someone could share any insight. I'm on win2016 server, IIS10

I've been using the refactored version from above, to redirect all of my 'extra' domains (my .nets, .orgs, slight mispellings, etc, to my mainhttps://geriatricspt.org works perfectly.

What if I needed now, to have one particular 'extra' domain, be exempted from this process, and have that one directed specifically to a subfolder of the main site.

I've tried this:
***************

<rules>

<rule name="forward gerinotes.org" patternsyntax="ExactMatch" stopprocessing="true">

<match url="*"/>

<conditions>

<add input="{HTTP_HOST}" pattern="gerinotes.org"/>

</conditions>

<action type="Rewrite" url="https://geriatricspt.org/members/publications/gerinotes/"/>

</rule>

<rule name="Redirect everything to https://geriatricspt.org" patternsyntax="Wildcard" stopprocessing="true">

<match url="*"/>

<conditions logicalgrouping="MatchAny">

<add input="{HTTP_HOST}" pattern="geriatricspt.org" negate="true"/>

<add input="{HTTPS}" pattern="off" ignorecase="true"/>

</conditions>

<action type="Redirect" url="https://geriatricspt.org/{R:0}"/>

</rule>

</rules>


***************

Thinking that the first rule would be processed, redirected to that subfolder, and then processing of rules would stop. But that is not what is happening. Instead, the lower rule takes over and everything lands at https://geriatrictspt.org . If you remove the lower rule, the top rule works perfectly.

Any advice is super helpful.

Regards
Steve


Viewing all articles
Browse latest Browse all 2482

Trending Articles



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