url rewriting - What RegEx pattern to use for URL rewrite to redirect traffic to HTTPS, but not from a particular subdomain? -


just got our ssl certificate installed , want redirect traffic https. running iis 7 on windows server 2008 using url rewrite module, want redirect traffic secure protocol, not particular subdomain.

for example:

mydomain.com , www.mydomain.com, want redirect https

however, admin.mydomain.com, want leave on http protocol

this example followed . set inbound rule , matching url pattern i'm using is:

^(?!(admin).*).*$  

this redirects traffic domain, it's redirecting traffic admin.mydomain.com, don't want. pattern use redirect traffic, except particular subdomain?

you'll need remove have , keep rule example, add 1 more condition below. negate=true ensures rules matches except domain want exclude:

<add input="{http_host}" negate="true" pattern="^admin.mydomain.com$"/> 

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -