Forum Moderators: coopster
As to whether it's a good idea will depend on why you're thinking of doing it. It'll be a good idea for some webmasters but not for others. :)
I'd have thought that the best way to do it would be .htaccess or by configuring Apache to do it even earlier (can't remember what that's called) rather than PHP.