Hi, I have an old site that used to have static html pages. After updating, I created rewrite rules in .htaccess to redirect the old urls to dynamic pages. For example: RewriteRule ^products/([-_A-Za-z0-9]+).html$ products.php?filekey=$1.html Does this rule look ok from a SEO perspective? Will the spiders be able to detect the redirect? (since its preserving the old url I thought not..) Site in question has dropped in ranks a few months after the update, so I'm trying to rule out any possible side effects from the redirects. Thanks!
RewriteRule ^products/([-_A-Za-z0-9]+).html$ products.php?filekey=$1.html [R=301,L] That will tell the SEs that your page has now moved to the new location. Simply redirecting does not make any diff since SEs still try to access your old pages. Hope this helps!
thanks gravis. Actually the point of the rewrite (in this case) is to keep the URL the same, so to the spiders (and humans) they shold hopefully see no difference, even though they are now being served a dynamic page. Do you still think I should add 301s?
301 - permanent redirect. Using 301 will tell the Search Engines that the old page is no longer there and it is now replaced with a new page. In future, when you see that your old pages are gone from search engines, you can safely remove the redirect. Otherwise, the SEs will continue to keep those old pages in their listing for a very long time and whatever you do with your new pages will take longer time to reflect in SE results.
Just to clarify - The old and new page are the same url. Mod-rewrite is allowing the new page to be dynamically generated behind the scenes, preserving the old url.
the redirect is internal, so that the old url (static) can display a dynamic generated page as outlined in the first post.
Great! In that case you don't need 301 at all. Going back to your original question - No, spiders won't be able to detect your internal rewriting