I recently released my new Drupal site online, replacing its predecessor, which was run by a home-spun CMS that I never really finished properly (I eventually gave up on re-inventing the wheel). My new Drupal site is at the same address as its predecessor.
The problem is that my logs are getting flooded with 404 errors, constantly reporting that the pages of the old site (which are no longer online) cannot be found. The errors are all generated by search bots such as googlebot continuing to hit these non-existent pages.
I've done some reading on the subject, including:
http://drupal.org/node/8278 (drupal handbook page on redirecting old URLs)
http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm (in-depth how-to on redirecting)
And from looking at these sources, I gather that putting a 301 redirect in my .htaccess file is the way to go. 301 is appropriate in my case, since all the 404-not-found pages have corresponding pages on the new site. Because the old URLs don't map exactly to the new ones, I have to put in a specific redirect for each one (only about 30 all up). Here's what I've got in my .htaccess (I put it just above the "overload PHP variables" in the Drupal default .htaccess - someone let me know if this is the wrong place, or if it even matters where it goes):
Redirect 301 /forums.php http://www.greenash.net.au/index.php?q=contact/forums
This works fine, and seems to be stopping the flood of errors. But what I'd really like is to do this:
Redirect 301 /forums.php http://www.greenash.net.au/contact/forums
When I do this, however, I get an http 500 error. Is there any way to make the old pages redirect to their corresponding new pages, but for the redirects to use clean URLs? Drupal handbook, other forum threads, and external sources that I've seen didn't answer this. I suspect that I need to use a mod_rewrite RewriteRule instead of just a Redirect, but I'm not much of a "regexpert", and don't know how to do it. Any suggestions?
All help appreciated,
Jeremy Epstein - GreenAsh