I couldn't find a straight answer to my question and need to know it from the real experts.
I had a website which urls were generated by Joomla. I believe that tons of urls are around in the search engines and I really don't know which of them all. A 302 redirect would be an option, but I can't say which urls need to be redirected.
The only thing I know that all the urls were generated by a sef404 script, it's a SEO script for Joomla.
My question, how can I make sure that all the orphan urls on google and other search engines are delivered correctly with a .htaccess file?
How do I 301 redirect all 404 pages to the homepage (root document)
At the moment I use a custom 404.html error file, but there are too many files and will give a rollercoaster of custom 404 error pages
I came up with the solution and posted it on my blog
here is the htaccess code also
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . / [L,R=301]
but I posted other solutions on my blog too, it depends what you need really