Hi, short question again.. i have a rewrite rule: RewriteRule ^([a-zA-Z0-9]+)/?$ /index.php?keyword=$1 [L] PHP: The problem, some keywords i want to have on a blacklist and then redirect them to another page... Any simple way to put such bad keyword into a blacklist? And maybe a formfield for that? Thanks for help,
You would need to use a php redirect and not an htaccess redirect to perform this. You could have the keywords in a database, text file, or just in an array.
Try to create a text file that contains the keywords that you blacklist. Enter one keyword per line. Such as blacklist.txt. <?php $blacklist_exists = 0; $fblacklist = fopen('./blacklist.txt','r'); while(!feof($fblacklist)){ $current_blacklist = trim(fgets($fblacklist,1024)); if(stristr($_GET['keyword'],$current_blacklist)){ $blacklist_exists = 1; break; } } fclose($fblacklist); header('location: your-new-url-location'); exit; ?> Code (markup): Good Luck