Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Bugs & Issues > URL rewrites causing search issue

URL rewrites causing search issue

  • Greg avatar

    Posted on Nov 7, 2011 (permalink)

    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.

    Reply

  • Radoslav Georgiev Radoslav Georgiev admin's avatar

    Posted on Nov 10, 2011 (permalink)

    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

    Reply

  • Greg avatar

    Posted on Nov 17, 2011 (permalink)

    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.

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Bugs & Issues > URL rewrites causing search issue