News for hackers. Stuff that matters.
Re:URL Rewriting for Beginners by ajross on Monday August 04, 2008 @11:44AM (#266370)
It needs to be pointed out that this kind of trick is essentially a workaround for the awful URLs caused by the "the URL is the path of the handler" scheme that Apache and PHP like to encourage.

It's almost always a better idea to do this another way. Note that the distinction between the "handler" part of the URL, the remaining "path-like" part and the query string is already exposed in the CGI variables (SCRIPT_NAME, PATH_INFO, and QUERY_STRING). The handlers can do this magic on their own. Doing it by placing important application code into the apache configuration for the site strikes me as very confusing.

Re:URL Rewriting for Beginners by mseebach on Monday August 04, 2008 @12:57PM (#266449)
Agreed. Indeed, most of the rewrites I've seen look like this: RewriteRule .* /index.php
Re:URL Rewriting for Beginners by samataro on Tuesday August 05, 2008 @01:13AM (#267185)
Are you implying that the front-controller pattern is bad?
Re:URL Rewriting for Beginners by mseebach on Tuesday August 05, 2008 @05:09AM (#267328)
No, but mod_rewrite is not the only way of implementing it. In the mentioned case, index.php would implement a front-controller. mod_rewrite is black magic, and will fail without suggesting why, just throwing a 500 Internal Server Error. Debugging a front controller in PHP (or whatever) it much easier.