Enable Strict URLs triggers 404 on search results
Running Structure on an EE2.5 install and Low search worked beautifully until I activated Enable Strict URLs.
Using this code on the results page:
{exp:low_search:results query="{segment_2}" status="not closed" disable="categories|member_data"}
{if count == 1}
<p class="">
{if low_search_keywords}You searched for <strong>{low_search_keywords}</strong>{/if}
and we have found <strong>{absolute_results}</strong> matches.
</p>
{/if}{/exp:low_search:results}
</div>
{exp:low_search:results query="{segment_2}" status="not closed" disable="categories|member_data"}
<div class="entry">
{if page_url != ''}
<a href=" {page_url}"> <h4>{title}</h4></a>
{if:else}
<a href="{comment_url_title_auto_path}"> <h4>{title}</h4></a>
{/if}
<p>Found in <a href="{comment_url_title_auto_path}" class="red"> {low_search_collection_label}</a>.</p>
<p>{low_search_excerpt}</p>
</div>
{paginate}
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
{/paginate}
{if no_results}
<p>
Sorry, your query did not return any results.
Check your spelling or try a different search term.
</p>
{/if}
{/exp:low_search:results}
Replies
Low 24 May 2013 07:02
That'll most likely be a Structure thing. It messes up the segments. Try using something like Freebie to get to the encoded query in the URI.
Nutmeg 24 May 2013 08:23
Thanks Lodewijk, where would I find the "encoded query in the URI"?
Low 24 May 2013 08:28
In your template, you're referring to it as {segment_2}. The segment that looks like eyJyZXN1bH...
Nutmeg 25 May 2013 04:43
Checked out Freebie but I have no much faith this add-on could solve the issue...
Low 25 May 2013 09:45
Can you turn on template debugging and copy/paste the output for the search results page here?