A redirect script is not working
-
Can anyone see why this wouldn’t work..
I have attempted two different ways of redirect – both don’t work
$country = $_GET[‘inf_custom_CountryDropdownMenu’];
echo “You are in ” . $country . “
“;
if ($country = “Argentina”) {
echo “Argentina – Redirecting now…”;
wp_redirect( ‘https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa’ );
exit;
}
elseif ($country = “Belice”) {
echo “Belice – Redirecting now…”;
wp_redirect( ‘https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa’ );
exit;
}
elseif ($country = “Bolivia”) {
echo “Bolivia – Redirecting now…”;
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Colombia”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Republica Dominicana”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Ecuador”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “El Salvador”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Guatemala”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Honduras”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Mexico”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Nicaragua”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Panama”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Paraguay”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Peru”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Uruguay”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
elseif ($country = “Venezuela”) {
header(“Location: https://ay150.infusionsoft.com/app/orderForms/programa_renovacion_visa”);
}
else {echo “Sorry I didn’t understand where you are…”;}It seems to always think it is in Argentina!
- The topic ‘A redirect script is not working’ is closed to new replies.