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

Forums / General Discussions / Include URL rewrites in search results

Include URL rewrites in search results

2 posts, 0 answered
  1. Sean
    Sean avatar
    5 posts
    Registered:
    26 Mar 2015
    14 Jul 2015
    Link to this post
    I'm looking into the possibility of using URL rewrites. Below is an example of the URL rewrite I am using.

    <rule name="Topic Rewrite" stopProcessing="true">
     <match url="^topics/([^$]+)" />
     <conditions>
    <add input="{URL}" negate="true" pattern="action/edit" />
     </conditions>
     <action type="Rewrite" url="topics?id={R:1}" />
    </rule>

    Now when using the Sitefinity search results widget, the URL rewrites do not appear in the search results. How can I go about including them in the search results?
  2. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    28 Sep 2016
    17 Jul 2015
    Link to this post
    Hi Sean,

    Please note that Sitefinity uses IContentLocatableView interface implemented on the out of the box content widgets in order to track their locations on different pages. This interface powers the Search indexing and the correct resolving of the links in it. It tells Sitefinity where the specified type of content is placed on the site and properly displays the links in the search results. So, the indexed items will appear in the search results with the links to the pages where they are rendered in Sitefinity.

    What i assume is that when the item is clicked then the rewrite rule you have implemented should be applied and the user should be redirected to this url.

    Regards,
    Sabrie Nedzhip
    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
     
2 posts, 0 answered