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

Forums / Developing with Sitefinity / Redirect URL with query string parameters

Redirect URL with query string parameters

5 posts, 0 answered
  1. Neil
    Neil avatar
    6 posts
    Registered:
    13 Nov 2013
    17 Mar 2015
    Link to this post

    When creating a redirect URL using "This page redirects to another page" and selecting external URL, any query string parameters added to the Sitefinity URL are lost after redirecting to the destination URL.  I tried creating a code-behind and overriding the OnLoad event and getting the current page using SiteMapBase.GetActualCurrentNode() so I could programmatically set the RedirectUrl property, but that property only has a getter.  

    I also tried setting a variable with the RedirectUrl value, appending my query string parameters to it and Response.RedirectPermanent using that variable value, but it appears that Sitefinity redirect value takes precedence over my redirect.

  2. Jonata
    Jonata avatar
    2 posts
    Registered:
    21 Jul 2011
    17 Mar 2015
    Link to this post

    Hi Neil

    You can use a normal page with a javascript widget.

    The javascript code is

    if(window.location.pathname.indexOf("/Action/Edit") == -1){
        window.location.href = "http://url" + window.location.search;
    }

    Jonata

  3. Angel Moret
    Angel Moret avatar
    29 posts
    Registered:
    02 Dec 2016
    19 Mar 2015
    Link to this post
    Hello Neil,

    We have provided an answer for you in the support ticket you had opened for this topic. Feel free to share the information with the rest of the community as well.
     
    Regards,
    Angel Moret
    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. Elan
    Elan avatar
    5 posts
    Registered:
    16 Oct 2014
    04 May in reply to Angel Moret
    Link to this post
    What is the resolution here? I have the same issue.
  5. Angel Moret
    Angel Moret avatar
    29 posts
    Registered:
    02 Dec 2016
    10 May
    Link to this post
    Hello Elan,

    The behavior that is experienced with the redirect is the default one, which means that query strings will not be passed down. We do have this Feature Request open in our Feedback Portal, which you can vote on in order to increase its prioritization.

    Additionally, you may also use the Javascript code provided by Jonata previously to achieve a similar functionality.

    Regards,
    Angel Moret
    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
     
5 posts, 0 answered