Is it better to handle friendly/clean/pretty URLs with mod_rewrite or a language like PHP?
问题 I'm developing my first decent-sized PHP site, and I'm a bit confused about what the "right way" (assuming there ever is such a thing) to handle clean/friendly/pretty URLs in the application. The way I see it, there are two main options (I'll use a simplified social news site as an example): 1. Use mod_rewrite to handle all potential URLs. This would look similar, but not identical, to the following: RewriteRule ^article/?([^/]*)/?([^/]*)/?([^/]*) /content/articles.php?articleid=$1&slug=$2