• Hi,

    I have been trying to redirect my users to my website https://www.mysite.com when they enter mysite.com is not redirecting or rewriting the url. I’m using IIS, I found the following rule and applied it with not luck:

    `<rewrite>
    <rules>
    <rule name=”Redirect https://mysite.com to https://www.mysite.com HTTP” patternSyntax=”ECMAScript” stopProcessing=”true”>
    <match url=”.*”></match>
    <conditions>
    <add input=”{HTTP_HOST}” pattern=”^mysite.com$”></add>
    <add input=”{HTTPS}” pattern=”off”></add>
    </conditions>
    <action type=”Redirect” url=”https://www.mysite.com/{R:0}” redirectType=”Permanent” appendQueryString=”true”></action>
    </rule>
    </rules>
    </rewrite>

    I restarted IISRESET after the changes and the application pool.

    thank you in advance,

Viewing 1 replies (of 1 total)
  • Geoffrey Shilling

    (@geoffreyshilling)

    Volunteer Moderator

    How about something like this?

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

Viewing 1 replies (of 1 total)
  • The topic ‘unable to change non-www to www’ is closed to new replies.