+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / 310 Redirects from other domains to new Sitefinity site

310 Redirects from other domains to new Sitefinity site

8 posts, 0 answered
  1. John
    John avatar
    7 posts
    Registered:
    11 Oct 2012
    20 May 2014
    Link to this post

    Hi folks,

    We have launched www.bellevuedowntown.com, and are working on some 301 redirects from legacy sites so we can retire them. The issue is that we have had trouble getting the URL Rewrite module in IIS to play nice with SF.

    For example, we need to redirect www.bellevuejazz.com (and all pages below) to a page on the new site, http://www.bellevuedowntown.com/events/bellevue-jazz-festival.  That's easy to do in a rewrite rule, but our rewrite rules are being overridden by SF and redirected to the home page.

    Has anyone had any experience with new sites that are consolidations of old sites (replacing multiple sites with one) and redirecting from those sites to individual pages on a new site?

    thanks

    John

     BTW 310 in the post title is a typo.  Should be 301.

     

  2. Craig
    Craig avatar
    82 posts
    Registered:
    07 Apr 2009
    20 May 2014
    Link to this post

    John,

    My guess would be that your redirect rule is not executing.  Here are a couple of things to check.

    1. Make sure you DNS and IIS bindings are set to point to the site that has the redirect rules enabled. 
    2. Add a rewrite rule that checks the http host and then perform the redirect. Below is a rule that I came up with that can do what you are looking to do.  (See code below)

    Let me know if this helps.

    <rule name="Redirect old site to new web site" stopProcessing="true">
        <match url="(.*)" />
        <conditions>
          <add input="{HTTP_HOST}" pattern="^www\.myoldwebsite\.com$" />
        </conditions>
        <action type="Redirect" url="http://www.mynewwebsite.com/some-new-page" />
    </rule>

    Thanks,
    Craig

  3. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    22 May 2014
    Link to this post
    Hello,

    Let us know if the proposed solution from Craig has solved the issue. If it still persists, could you please send us the rewrite rule you use?

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  4. John
    John avatar
    7 posts
    Registered:
    11 Oct 2012
    22 May 2014 in reply to Nikola Zagorchev
    Link to this post

    Craig - thanks for your proposed solution.  Unfortunately we are seeing the same behavior.  All of our redirects or rewrites onlygo to the root of the new site - not the specific page.

    Here is our redirect section from our Web.config

     

    <rewrite>
                <rules>
                    <rule name="CanonicalHostNameRule1" enabled="true">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="^www\.bellevuedowntown\.com$" negate="true" />
                        </conditions>
                        <action type="Redirect" url="http://www.bellevuedowntown.com/{R:1}" />
                    </rule>
                    <rule name="Redirect BellevueJazz" stopProcessing="true">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="^www\.bellevuejazz\.com$" />
                        </conditions>
                        <action type="Redirect" url="http://www.bellevuedowntown.com/events/bellevue-jazz-festival/overview" />
                    </rule>
                    <rule name="Bellevue Local Table" patternSyntax="ExactMatch">
                        <match url="http://www.bellevuelocaltable.com" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/blogs/bellevue-local-table-blog" />
                    </rule>
                    <rule name="BLT 2" patternSyntax="ExactMatch">
                        <match url="http://bellevuelocaltable.com" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/blogs/bellevue-local-table-blog" />
                    </rule>
                    <rule name="BLT Restaurants 1">
                        <match url="http://www.bellevuelocaltable.com/restaurants" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/play/dining" />
                    </rule>
                    <rule name="BLT Restaurants 2">
                        <match url="http://bellevuelocaltable/restaurants" />
                        <action type="Rewrite" url="http://www.bellevuedowntown/play/dining" />
                    </rule>
                    <rule name="BLT Happy Hours 1">
                        <match url="http://www.bellevuelocaltable/happy-hours" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/play/happy-hours" />
                    </rule>
                    <rule name="BLT Happy Hours 2">
                        <match url="http://bellevuelocaltable/happy-hours" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/play/happy-hours" />
                    </rule>
                    <rule name="BLT Events 1">
                        <match url="http://www.bellevuelocaltable.com/category/events" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/events" />
                    </rule>
                    <rule name="BLT Events 2">
                        <match url="http://bellevuelocaltable/category/events" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/events" />
                    </rule>
                    <rule name="BLT Blog 1">
                        <match url="http://www.bellevuelocaltable.com/category/blog" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/blogs/bellevue-local-table-blog" />
                    </rule>
                    <rule name="BLT Blog 2">
                        <match url="http://bellevuelocaltable.com/category/blog" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/blogs/bellevue-local-table-blog" />
                    </rule>
                    <rule name="BLT Main" patternSyntax="ExactMatch">
                        <match url="http://bellevuelocaltable.com" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/blogs/bellevue-local-table-blog" />
                    </rule>
                    <rule name="BLT Main 2" patternSyntax="ExactMatch">
                        <match url="http://www.bellevuelocaltable.com" />
                        <action type="Rewrite" url="http://www.bellevuedowntown.com/blogs/bellevue-local-table-blog" />
                    </rule>
                </rules>
            </rewrite>

    Any guidance, hints or directions much appreciated.  Rackspace support believes that the rewrites are working but then getting countermanded by SF.

     thanks

    John

     

  5. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    23 May 2014 in reply to John
    Link to this post

    I have used IIS to do similar things with legacy sites going over to Sitefinity and have not encountered Sitefinity getting in the way.  Here is an example of a ruleset I have used to push old sites to the new site. 

    <rules>
             
            <rule name="Domain Rewrites" stopProcessing="true">
              <match url="(.*)" />
              <conditions logicalGrouping="MatchAny">
                <add input="{HTTP_HOST}" pattern="^(www.)?somedomain.*(org|com)$" />
                <add input="{HTTP_HOST}" pattern="^(www.)?somedomain2.org$" />
                <add input="{HTTP_HOST}" pattern="^(www.)?somedomain3.*(org|com)$" />
              </conditions>
              <action type="Redirect" url="http://www.newdomain.com/{R:0}" />
            </rule>
          </rules>

    I have also used rewrite maps for bulk 301s on exact matching. 

  6. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    27 May 2014
    Link to this post
    Hi,

    I just tested the proposed solution by Stacey with two Sitefinity instances and the rules work fine. I get redirected to the correct page and not bounced to the Home page. Please, give it a try and tell us if it works for you.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  7. John
    John avatar
    7 posts
    Registered:
    11 Oct 2012
    01 Jun 2014 in reply to Nikola Zagorchev
    Link to this post

    Hi folks,

    Thanks for all of the suggestions - and yes Stacey's code worked for us.  We have things working now.  It turned out that the first rule in the list was the problem (the StopProcessing directive), and things were also complicated by some additional domain forwarding at GoDaddy.  We ended up just using the domain forwarding at GoDaddy instead of redirect/rewrite rules.

    thanks

    John

  8. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    02 Jun 2014
    Link to this post
    Hi John,

    I am glad you have resolved the issue. Thanks to Stacey and Craig who shared their experience about this, as well.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
8 posts, 0 answered