• Sign In
  • Join

Microsoft
  • IIS
  • Home
  • Manage
  • Downloads
  • Learn
  • Reference
  • Solutions
    • Technologies
    • .NET Framework
    • ASP.NET
    • PHP
    • Windows Server
    • SQL Server
    • Web App Gallery
    • Microsoft Azure
    • Tools
    • Visual Studio
    • Visual Studio Code
    • Web Platform Installer
    • Get Help:
    • Ask a Question in our Forums
    • More Help Resources
  • Blogs
  • Forums

Home IIS.NET Forums IIS 7 and Above General IIS HTTP Redirect too many times error Re: IIS HTTP Redirect too many times error

View Complete Thread

Shortcuts

  • Active Threads
  • Unanswered Threads
  • Unresolved Threads
  • Advanced Search
    • Reply
    Jalpa Panchal Jalpa Pancha...

    976 Posts

    Re: IIS HTTP Redirect too many times error

    Jan 04, 2019 08:59 AM|Jalpa Panchal|LINK

    Hi distanceeducation,

    distanceeducation

    <system.webserver>
    <rewrite>
    <rules>
    <rule name=”Redirect to WWW” stopprocessing=”true”>
    <match url=”.*”></match>
    <conditions>
    <add input=”{HTTP_HOST}” pattern=”^yourdomainname.com$”></add>
    </conditions>
    <action type=”Redirect” url=”http://www.yourdomainname.com/{R:0}” redirecttype=”Permanent”>
    </action></rule>

    <rule name=”Default Document” stopprocessing=”true”>
    <match url=”(.*?)/?default\.aspx$”>
    <action type=”Redirect” url=”{R:1}/”>
    </action></match></rule>
    </rules>
    </rewrite>
    </system.webserver>

     Your url rewrite rule is not in proper format and i tried your url rewrite code:

    rule name="Redirect to WWW" stopProcessing="true">
    <match url=".*"></match>
    <conditions>
    <add input="{HTTP_HOST}" pattern="^site1.com$"></add>
    </conditions>
    <action type="Redirect" url="http://www.site1.com/{R:0}" redirectType="Permanent"/>
    </rule>

    <rule name="Default Document" stopProcessing="true">

    <match url="(.*?)/?index\.php$" />
    <action type="Redirect" url="{R:1}/"/>
    </rule>

    it shows me below error:

    Could you tell us what is your actual requirement?

    Regards,

    Jalpa.

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • This site is managed for Microsoft by Neudesic, LLC. | © 2019 Microsoft. All rights reserved.
  • Privacy Statement
  • Terms of Use
  • Contact Us
  • Advertise with Us
  • Hosted on Microsoft Azure
  • Follow us on:
  • Twitter
  • Facebook
  • Microsoft
  • Feedback on IIS