What's the best solution for shortening long url's that looks like form.php?state=ca&country=usa&area=bay_area ...
into
form.php/usa/ca/bay_area
or
form/usa/ca/bay_area
?

I've attempted to devise a method that doesn't require any packages. But, it involves dynamically creating directories with a script that parses all the get parameters into folders. I recently learned that there's a max number of directories and files allowed in a *nix directory, so this method is not extensible enough...