Through some reading on the web today, I discovered that we
can achieve clean urls without depending on the
mod_rewrite. The trick is to set ErrorHandler directive
to your php script such as index.php and then you can
manipulate the urls at will in your script. It’s however
has some limitation, at least in apache that you’ll lost
your POST data. Lighttpd, though I’d never try it
seem’s to be nice with this trick. Maybe this can be a good
reason for me to switch to Lighty. :)
I’m not sure whether this trick will give performance
penalty since for every request the server will try to find
the requested file first and then fallback to ErrorHandler in
this case index.php if none was found. This trick however
look’s cool to me since manipulating url in php code is much
easier to debug than using mod_rewrite.