All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Having trouble redirecting to Low Search results Page

tim willis 26 Oct 2018 15:25 problem, complete

I am in the process of setting up Low Search on a site to replace Super Search. I've installed Low Search, created collections, weighted them appropriately and added the template tags for a search form and results page, but for some reason I can't get the search form to redirect to the results page.

http://www.winningwritersee4.dreamhos...

I've also set up a "test" search form here that has the same behavior.

http://www.winningwritersee4.dreamhos...

Here are my template tags. Thanks!

 
{exp:low_search:form result_page="search/results"}

Keywords

Search

{/exp:low_search:form}


 
{exp:low_search:results
keywords:lang="en"
keywords:inflect="yes"
limit="10"
paginate="both"
}
{if count == 1}

Searched for {low_search_keywords}.
Search results: {absolute_results}


{/if}

{if wi-long}{wi-long}{if:else}{title}{/if}
{low_search_excerpt}

{paginate}
Page {current_page} of {total_pages} pages. {pagination_links}

{/paginate}

{if low_search_no_results}

No results for “{low_search_keywords}”.
{exp:low_search:suggestions keywords="{low_search_keywords}" keywords:lang="en" limit="2"}
{if suggestion_count == 1}Did you mean{/if}
{suggestion}{if suggestion_count != total_suggestions} or {if:else}?{/if}
{if no_suggestions}Check your spelling or try a different search term.{/if}
{/exp:low_search:suggestions}


{/if}
{/exp:low_search:results}

Replies

  1. Low 26 Oct 2018 17:52

    The LS form should submit to the site's index.php file, which triggers an EE action, which redirects you to the search results page. LS uses EE's API for that, so you could try and use the native search form to see if the issue occurs there, too.

    Maybe you have a static cached page in place for the index page? Or some htaccess rule that throws a spanner in the works?

  2. tim willis 26 Oct 2018 17:56

    Thanks Low!

    Here is the contents of my .htaccess file, is it possible something here is tripping that up?

     
    # THIS NEEDED FOR DREAMHOST BEFORE THE REWRITE HAPPENS FOR EE ... THE FAILED_AUTH ISN'T NEEDED BUT LEFT IN THERE IN CASE FOR FUTURE DIRECTORIES / FILES EXAMPLE
    #
    ErrorDocument 401 "Error"
    ErrorDocument 403 "Error"

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/(ww-admin|failed_auth\.html).*$ [NC]
    RewriteRule . - [L]

    #
    # EE PREFERRED METHOD FOR REMOVING INDEX.PHP - THIS ALSO DONE IN TANDEM WITH SETTING NAME OF INDEX FILE TO NOTHING IN EE ADMIN - SYSTEM PREFERENCE - GENERAL CONFIGURATION

    RewriteEngine On
    RewriteCond $1 !\.(gif|jpe?g|png|/uploads/)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

  3. Low 26 Oct 2018 17:59

    I don't believe so. But if you can reproduce that same behaviour with the native Search module, you're looking at an issue not related to LS, so I'd check that first.

  4. tim willis 26 Oct 2018 18:00

    OK -- I'll give it a go.

    Prior, Super Search was behaving as expected, but it looks like that add-on points directly to the results page instead of index.php

    Low 26 Oct 2018 18:01

    Correct, Super Search doesn't use EE's actions in that way.

  5. tim willis 26 Oct 2018 19:43

    Sorry for the bother, you were correct!

    My host cPanel settings were directing to a www domain but the EE control panel had a domain without www specified, so we were getting a loop as you expected.

    Thanks again