[Resolved] Google Custom Search — Close to fixing it
I’ve been working on integrating this Google Custom Search into my site on and off over the last couple days, and I think I’ve finally figured it out.
I’m hoping someone will have a good idea for the best possible solution.
When the search results are generated from the Google search box located at the top of my home page the results are displayed accurately on my page (named ‘search’):
When the search results are generated from the Google search box located at the top of my category pages (i.e. category) the 404 Error is generated on:
My ‘search’ page, to display the search results — which I created from my dashboard — can only be found at http://localhost/search.
That’s why I’m getting the 404 error. It’s looking for my ‘search’ page at: localhost/category/politics/search, and it’s not there.
So, the problem was that when Google asked me to name the page for search results, it said not to include the url — that a single page name like “search” would be appended at the end of the url automatically.
I can hardcode the entire static url on my search form: <form action=”http://www.website.com/search” … instead of <form action=”search” … but I’d like to find a dynamically generated url that can work on both my local environment testing site and my main site.
What would you advise?
Any ideas on the very best way to achieve this so that it will work well on all browsers?
I hope that someone will please answer me, this time.
- The topic ‘[Resolved] Google Custom Search — Close to fixing it’ is closed to new replies.