low_googlesearch returning 404 page instead of results for all searches
We are having trouble getting low_googlesearch to work in our dev environment.
It is installed the same way as it is on live, and is working from a copy of the live environment. It currently works on our live server.
When a search is submitted, the page takes longer than usual to load, and then loads our 404 page rather then the search/results page.
We have installed LGS 1.3.0 and EE 2.10.2.
What could cause this?
Replies
Low 8 Jan 2016 08:36
It might be that the Google Search server doesn't accept requests from your localhost or dev server. Is it a hosted service, or a search appliance you're using?
James Freed 8 Jan 2016 12:05
We are using a google custom search engine (not appliance). I do not see any settings in the CSE for a IP whitelist.
Low 8 Jan 2016 14:03
Is mod_security installed on that particular server, maybe?
James Freed 8 Jan 2016 14:48
No, but it is behind a VPN. Does the GSE call back to low google search?
James Freed 8 Jan 2016 14:50
What are the requirements? We do have a number of ports blocked, but a standard curl works.
Low 8 Jan 2016 15:00
LGS uses cURL (or file_get_contents if that's not available) to fetch the XML results from Google, which is via the default port 80.
James Freed 8 Jan 2016 15:08
I have just confirmed that a curl from the server to the GCE works, and that our credentials work. I am still getting a 404 instead of search results, and no LGS error that i can see.
Low 8 Jan 2016 15:09
I'll need to take a look myself. Please send SuperAdmin and FTP login credentials to hi at gotolow dot com if you can.
James Freed 11 Jan 2016 13:48
Thanks for your help Low!
It turned out that we had a rewrite rule in place on our development server that was not on the live server. Low showed us this by entering a known good search url into the browser location and seeing the page get redirected to a 404.