More in this section

301 Redirects

4 posts, 0 answered
  1. Elie
    Elie avatar
    0 posts
    Registered:
    18 Jul 2016
    12 Dec 2016
    Link to this post

    Hi, 

    We have a client running the latest version of Sitefinity Standard and we are curious to know how to configure redirects to the main host name for every other host name that points to the site.

    Thanks!

  2. Elie
    Elie avatar
    0 posts
    Registered:
    18 Jul 2016
    16 Dec 2016
    Link to this post

    @Sitefinity 

     

    Any articles or any response would be appreciated...it's been 4 days....

  3. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    27 Dec 2016
    Link to this post

    Hi Elie,

    For creating redirects from other hostnames to main hostname, better to use IIS rewrite module.

    So, you need to install this module https://www.iis.net/downloads/microsoft/url-rewrite (may be already installed)

    Then, add inside you web.config  place rewrite rule (just replace b.site.local) with your domain name

    <rule name="Redirect To Main Domain" stopProcessing="true">
                <match url=".*" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="^b.site.local$" negate="true"/>
                </conditions>
                <action type="Redirect" url="http://b.site.local/{R:0}" />
    </rule>
  4. Elie
    Elie avatar
    0 posts
    Registered:
    18 Jul 2016
    04 Jan
    Link to this post

    Thanks Victor, i'll let you know if this doesn't work. 

     

    Elie

4 posts, 0 answered