The way I do this is using the Apache Webserver's mod_rewrite
engine:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
That is, of course, if you're running on an apache server and
have the willingness/time to learn another interesting feature of
Apache. I've been using this with Coldfusion, PHP, and many
different pre-built CMS systems. If you're running IIS I know there
is a non-free alternative, but I'd search for "IIS mod_rewrite" if
that's the case.
If you are running Apache and want to give it a try just
search for "mod_rewrite howto" or something of the like.