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

Forums / Bugs & Issues / URL rewrites causing search issue

URL rewrites causing search issue

3 posts, 0 answered
  1. Greg
    Greg avatar
    2 posts
    Registered:
    26 Oct 2011
    07 Nov 2011
    Link to this post
    Good morning. I am currently managing a Sitefinity 3.7 site which was recently transitioned from a PHP codebase. As such, there are a large number of permanent redirects in the web.config file. Site search is also enabled via Sitefinity. The problem I'm having is this: the rewrite rules are somehow applying to the search results as well. For example, the following rewrite rule is in-place:

    <rule mode="PermanentRedirect">
    <url>store/?$</url>
    <rewrite>/store-locator.aspx</rewrite>
    </rule>

    If I go to the site search and search for the keyword "store," the returned result is "/store-locator.aspx." This is obviously very undesirable and unexpected behavior. If anyone has experienced this or has a solution, please let me know. If you would like more information, please ask. Thank you.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    10 Nov 2011
    Link to this post
    Hi Greg,

    The problem is that your rule matches Query string values also. Please edit your rules so that they do not mach query strings for the search.

    Regards,
    Radoslav Georgiev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. Greg
    Greg avatar
    2 posts
    Registered:
    26 Oct 2011
    17 Nov 2011
    Link to this post
    Thank you for your reply. I was able to simply and successfully modify the URL rewrites in a similar fashion as below:

    <rule mode="PermanentRedirect">
     <url>^/store/?$</url>
    <rewrite>/store-locator.aspx</rewrite>
    </rule>

    I appreciate your help.
Register for webinar
3 posts, 0 answered