I have an auto-updated youtube api website where the site urls are always in the form www.mydomain.com/video/yt.php?$TITLE or www.mydomain.com/video/$ID/$TITLE.html where $ID is the video id and $TITLE is the video title. Now I want to disable/ban any page that the $TITLE contains a certain word (e.g. sex). Any idea how can I do that?
www.mydomain.com/video/yt.php?$TITLE In yt.php add the following php code at the very top: <?php //example... $banned_words = array('sex'); if(in_array($_GET['yt'], $banned_words)) { header('Location: http://'.$_SERVER['HTTP_HOST']); } ?> PHP: