感谢大家。
如果您有多个产品,我会添加解决方案:
if(isset($_GET['submit']));
$product1_keywords = array('feeds', 'weanrite', 'Wean Rite');
$product2_keywords = array('gro rite', 'Gro Rite', 'grorite', 'growing feeds');
$product3_keywords = array('rite start', 'Rite Start', 'starter feed');
$search = $_GET['search'];
// caller of entered value on text field ???
if(in_array($search , $product1_keywords)) {
// if value of text field is matched with my preferred keywords
// Redirect page if match
header('Location: http://localhost/equalivet_2/#products/wean_rite.html');
}
elseif(in_array($search , $product2_keywords)) {
header('Location: http://localhost/equalivet_2/#products/gro_rite.html');
}
elseif(in_array($search , $product3_keywords)) {
header('Location: http://localhost/equalivet_2/#products/rite_start.html');
}
else {
// Redirect page if not match
header('Location: http://localhost/equalivet_2/equalivet/not_found.html');
}
die;
?>谢谢。我希望这可以帮助那些可能需要这篇文章的人