I want redirect the browser to a page if some parameters is not present in the url.
Code: Select all
#!/bin/bash
PARAMS=`echo $QUERY_STRING | cut -d\? -f 2`
.....
ACT1=`echo $PARAMS | cut -d\& -f 1`
ACT2=`echo $PARAMS | cut -d\& -f 2`
ACT3=`echo $PARAMS | cut -d\& -f 3`
.....
echo "<head>"
if[($ACT1 != "IN1=on" && $ACT1 != "IN1=off")||($ACT2 != "IN2=on" && $ACT2 != "IN2=off")];
then
echo "<meta http-equiv=\"refresh\" content=\"1;URL='/GPIO_GETDIR.php'\"/>"
fi
Thank You