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

Forums / Developing with Sitefinity / RSS Feed - Item link's incorrect

RSS Feed - Item link's incorrect

4 posts, 0 answered
  1. Ly
    Ly avatar
    10 posts
    Registered:
    21 Oct 2010
    29 Oct 2010
    Link to this post
    Hi,

    Currently using 3.5, on our live-site I noticed that our blog rss feed's item's links are incorrect.

    e.g in http://www.mysite.com/blogsTest.rss.ashx
    First item link is http://mysite.com:443/blogs/first.aspx when I think it should be http://www.mysite.com/blogs/first.aspx.

    I checked the root web.config if there was anything with 443 but found nothing.  Our dev (mysitedev) site has no trouble with this.  Can anyone shed some light on this?

    Thanks.


    Ly
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    29 Oct 2010
    Link to this post
    Hello Ly,

    The item url is build based on the rss channel page . We resolve the absolute url which includes the host and its port( if there is). 443 port is generally used when you run the website under SSL. Most probably you are routing the requests and this includes the port as well or you have set the SSL over the entire web site inside IIS.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Ly
    Ly avatar
    10 posts
    Registered:
    21 Oct 2010
    05 Nov 2010
    Link to this post
    Hi Ivan,

    I had a chat with my senior and he said he won't touch the IIS settings. 
    How would I edit the method in which it resolves the absolute URL's?

    Senior wrote this:

    There is routing as part of the Redirection functionality, I wouldn't recommend modifying that.

    You'll have to overide the Url parsing function in the ashx file. You may be able to do this directly or you may have to create a custom class overiding the function.

    Any other solutions that's less painful?


    Ly

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    05 Nov 2010
    Link to this post
    Hello Ly,

    You have to create a custom RssChannelProvider that inherits from Telerik.Cms.Engine.RssChannelProvider. Then override SetGeneralProps methods from where you have access to the RssItem item object and you can set the item.Link.

    sample

    public class RssChanelCustom : Telerik.Cms.Engine.RssChannelProvider
    {
        protected override void SetGeneralProps(Telerik.Rss.RssItem item, IContent content)
        {
            //base.SetGeneralProps(item, content);
            item.Link = //(System.Uri)"format the link here";
        }
    }


    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered