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

Forums / General Discussions / /Search-results? goes to root

/Search-results? goes to root

2 posts, 0 answered
  1. Ryan
    Ryan avatar
    2 posts
    Registered:
    26 Aug 2011
    24 Nov 2011
    Link to this post
    Our site lives on a folder on a domain, ala http://domain.com/foldername
    Go to http://domain.com/foldername and you get the home page of our site

    When using the Sitefinity search, it always resolves to http://domain.com/search-results?indexCatalogue=index&bla
    But I need it to keep that Folder name in the URL.

    Oddly enough, on some pages the site still resolves and displays the results as expected with out that folder name (caching I would imagine or some kind of session being held) but on some pages, it breaks

    I want http://domain.com/foldername/search-results?indexCatalogue=index&bla
    not
    http://domain.com/search-results?indexCatalogue=index&bla

    Ideas?
  2. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    24 Nov 2011
    Link to this post
    Ryan,

    You can try something like this in your web.config.

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="Search Results Rewrite" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="search-results" />
                        <action type="Redirect" url="/sitefolder/search-results" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>

    You'll need to modify that snippet for your needs but it should get you started. There's also an option located in Administration -> Settings -> Advanced -> System -> Site URL Settings that may be of some use.
2 posts, 0 answered