My php script gets the value of a variable passed in through a form and then inserts its value into a URL string (for $word) . Then the URL is called by means of a header of the location type. The purpose is to call another external search engine, pass it the value that I want to search for, but then have that search engine (google) only search my site. I copied the URL string from what google would generate, substituting my variable. (below, in the actual code, I've substituted "mysitesurladdress" for the actual URL for site privacy)
header("Location: http://www.google.com//search?as_qt=w&as_q=$word&as_eqt=w&as_eq=&as_dt=i&sitssearch=mysitesurladdress/&lr=lang_en&num=50&btnG=Google+Search");
However, when this runs, I'm getting the following 404 error message:
The requested URL
//search?as_qt=w&as_q=product&as_eqt=w&as_eq=&as_dt=i&sitssearch=mysitesurladdress/&lr=lang_en&num=50&btnG=Google+Search
was not found on this server.
Please help; is there a better way to accomplish this? This is only a demo project.