I have removed a forum system from my CMS and now I want to return an 410 status code whenever a search engine visits the former posts. I know that I have to use a number of Rewrite Rules to do the job, but I can't get them working. These are a couple of examples of what I've done:
RewriteCond %{QUERY_STRING} forum-viewtopic
RewriteRule .* - [G]
RewriteCond %{QUERY_STRING} forum-viewforum
RewriteRule .* - [G]
Do you what am I doing wrong?