WordPress.org

Ready to get started?Download WordPress

Forums

no www address redirect issue with IIS on wordpress (4 posts)

  1. richlondon
    Member
    Posted 2 years ago #

    Hi,
    I have the site http://www.btl.com which is running on IIS
    When someone types in "btl.com" they get redirected to a 404 page, where is trying to find the page http://www.btl.com/www.btl.com

    I'm guessing that my web.config file needs some tweaking am I correct?
    It currently has the line
    "<httpRedirect enabled="false" destination="http://btl.com" childOnly="true" httpResponseStatus="Permanent" />"

    when I set it to true the browsers can't get to the btl.com site..

    Can someone help please?

    thanks in advance

    Rich

  2. richlondon
    Member
    Posted 2 years ago #

    Can anyone help me with this please?

    thanks

  3. richlondon
    Member
    Posted 2 years ago #

    solved it with this rule..

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

    placing this as the very first rule.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Try resetting your custom permalinks back to the default setting via Settings -> Permalinks. If this works, then review Using_Permalinks before setting a custom permalink structure back up again.

Topic Closed

This topic has been closed to new replies.

About this Topic