Yes, that's works particularly well with a mod_rewrite setup like this:
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} !/static/.*
RewriteRule .* index.php
Basically every request goes to your script, except things you don't want, like requests for images and js files.
Then you can take apart the request as per the suggestion above. I usually go:
Code:
$url_vars = explode('/',$_SERVER['REQUEST_URI']);
// more code...like regex. Also you need to
//redirect to /foo/ if user requests /foo because
//apache can't do this for you any more.
$sql = "SELECT stuff FROM tbl WHERE cat = '{$url_vars[1]}'";
and so on.
Then make all your links relative to doc root, like this:
href="/cat/subcat/some_product.htm"
Works sweet, and is of minimal difficulty. As an added bonus, you'll never get a 404 again :)