Hello. I did a quick-look through FAQ section and I didn't find the answer, so - Is it possible (via .htaccess) to manually redirect certain URL to 404 error page? I'm having difficulties with one of my websites, which had the aardvark topsites script installed earlier and is now a fresh wordpress content, but some of the old URL's (i.e. http://www.my-domain.com/?a=stats&u=username&all_reviews=1) are still in google and I'd like to redirect all the url's containing "?a=stats...." to be redirected to my 404 page, as my 404 page already is connected with the index page. Is it possible to do it, and if so, how? Thanks, T.
Do it with a redirect, and make sure your 404 page outputs 404 headers, for the bots (or even 410). If you don't like that, use a redirect to a page that will never exist.
Try something along these lines: RewriteEngine On RewriteCond %{QUERY_STRING} ^a=stats$ RewriteRule ^(.*)$ /your-404.html [R=301,L] Code (markup): That will redirect any url that contains a=stats in the query string to your 404 file as a permanent redirect.
However, your 404 page has to output 404 headers, or that will just send out 301 headers, and the bots wont know not to index that.