Redirect URL with query string parameters - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Redirect URL with query string parameters

  • Redirect URL with query string parameters
  • 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.

  • 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

  • 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
     
  • What is the resolution here? I have the same issue.
  • 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
     
  • Hi Angel,

     

     

    Has this been resolved? I need query string parameters to stay with the visitor at all time s even if redirected,  can you provide feedback?