how to throw 404 if query string doesn't contain the word "news" all query string must contain "news" example: mysite.com/index.php?q=obama-gossip-news ->Okay mysite.com/index.php?q=obama-gossip-etc ->redirect to 404.php thanks
Since it's a query string you should do something like: RewriteCond %{QUERY_STRING} !news [NC] RewriteRule ^(.*)$ /404.php [L] Code (markup): If the word "news" is missing from the string it should redirect it to your error page.