简体   繁体   中英

Redirect Loop - IIS7

Getting a redirect loop when using the below rule on IIS7 using the rewrite module.

         <rule name="redirect" stopProcessing="true">
      <match url="test" />
      <conditions>
        <add input="{HTTP_HOST}" pattern="domain.com$" />
      </conditions>
      <action type="Redirect" url="http://www.domain.com/new/test" appendQueryString="false" redirectType="Permanent" />
    </rule>

Any ideas?

Thanks

Looks like you are trying to redirect from http://domain.com to http://www.domain.com

Believe the correct pattern should be "^domain\\.com$"

This matches the entire HTTP_HOST value of "domain.com"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM