Forum Moderators: phranque
I'm building a dynamic site. I'm using mod_rewrite, to avoid the querystring issue.
The products I'm selling having a limited shelf-life, at which point they'll be removed from the database, which will cause a problem if the SE's have indexed a page, which now produces an empty recordset error.
I was planning on using PHP to do a 301 redirect to the home page, when it detects an empty recordset, to avoid this problem.
Does this sound like a sensible approach, or can anyone foresee any problems this might cause?
Thanks
Ben
No damage would likely be done if you added a meta-refresh to that error page, as long as the timer is set to above 5 seconds.
If you use the HTTP response code 'signalling system' as it was intended to be used, you'll rarely have problems.
If your products have a *very* short lifespan, then I'd recommend putting the emphasis on getting the category pages ranked well, at the cost of the individual product pages -- maybe even disallow those very-short-life product pages from being spidered. This would avoid having the SEs notice excessive 'churn' on your product pages. I don't know your site or product line, or exactly what you mean by 'short shelf-life' in absolute terms, so this will either make a lot of sense, or none at all. If it doesn't make sense for your site, ignore it!
Note that I recommended a 410-Gone and not a 404-Not Found response. The latter response means you (the Webmaster) might not have expected the page to be missing, while the former states explicitly that the resource was intentionally removed. So a 410 is quite unambiguous compared to a 404.
Jim