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

Support archive

removing "www." with .htaccess causes Low Search to jump to index page.

David Lang 4 Aug 2014 19:23 problem, active

I'm using the latest version of Low Search.

LS wasn't working, it didn't seem to recognize my result_page=(...) parameter, instead it was throwing me back to my index page.

However http://www.mydomain.com/?ACT=28&keywo... WAS working.

It took me a while to figure out why:

# Remove the www from the URL
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Removing the "www." in my .htaccess caused the problem.
I deleted the rewrite-condition, so LS working again.
But maybe there is a workaround for this.

Replies

  1. Low 4 Aug 2014 19:59

    Well, LS needs to submit to the index.php of your EE installation, just like any other form generated by EE. Does the same effect occur when you use the native search form?

    You might be able to change the rewrite rule to account for POST requests.

  2. David Lang 4 Aug 2014 21:35

    > Does the same effect occur when you use the native search form?

    Why would i want to do that? i got Low Search ;)
    Haven't tried, but i will. For scientific purporses.

    > You might be able to change the rewrite rule to account for POST requests.

    Yes, I think i might. I just wanted to post this behaviour because it was driving me insane until i figured it out. Maybe someone else has the the same problem and is looking for a solution.

    I'll post my results a soon as I have the time to test :)

  3. Low 6 Aug 2014 09:22

    If we want to rule out LS as the source of the problem, you have to try it with native search. I'm thinking the issue is more installation-wide, rather than LS-specific. Any form submitted on the front-end would behave like that, making it an EE issue, rather than a LS issue.