Invalid URL Error for Low Search
I am getting a "Bad Request - Invalid URL" (HTTP Error 400. The request URL is invalid.) error now whenever I use Low Search. In the development server I have everything working, but now on the live server it seems to be broken. Any ideas on why this might be happening?
The one thing that might be causing it is that the old server was an Apache and the new one is running windows. Could this be the cause?
Also, I can see the template fine (without any results) if I just go to that URL. Any help would be awesome as the site is supposed to launch tomorrow (of course!).
Broken search page
http://www.tedallas.org/index.php/sit...
Template Working Fine Page
http://www.tedallas.org/index.php/sit...
Replies
Low 12 Sep 2012 20:30
Looks environmental, then. Do you have mod_security running on the server?
yankeyhotel 12 Sep 2012 20:31
Not sure, I'll check. I am guessing by your reply that it should be turned off?
and thanks for the speedy reply!
Low 12 Sep 2012 20:33
It depends on your host. I'm checking some other possibilities, too.
Low 12 Sep 2012 20:41
Looks like the length of the URL is an issue here. Apparently that's environment dependent.
I can give you some pointers that might help. You're just using a simple form; no collection selection or search_mode selection. To make the URL shorter, you can move the collection="" and search_mode="" parameters from the Form tag to the Results tag. Also, remove the name="" attribute from the submit button. That should already help making the URL shorter and avoiding the error.
Low 12 Sep 2012 20:52
As @_rsan mentioned, this is a Windows Server issue. I do recommend using his suggestion: using query string URLs.
The other tips still apply, tho. :)
yankeyhotel 12 Sep 2012 20:55
Thanks again! You guys are awesome for helping so fast!
Low 12 Sep 2012 21:03
You're welcome!
As a final note, Low Search v2.1.0 uses a different way of encoding the search query in the URL, which results in shorter URIs. Could also help. :)