>>1 sounds like a job for mod_rewrite (assuming you're on an apache-or-compatable server)!
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html