Note: Using URL rules will degrade application performance. This is because when parsing the request URL, CUrlManager will attempt to match it with each rule until one can be applied. The more the number of rules, the more the performance impact. Therefore, a high-traffic Web application should minimize its use of URL rules.
–
If I wanted to create a site similar to Facebook style whereby it does a check for the username in the URL, for example: myfacebook.com/username
.htaccess is obviously more flexible. Performance impact is not significant since there are other things that have much more impact on the loading time (database, opcode-caching etc).
Doesn’t make sense to add any special rules to the htaccess. The urlmanager should do the work. Then it’s also easier to switch webservers later.
On high performance sites you’ll want to avoid AllowOverride (== enable .htaccess) as Apache needs to search for .htaccess files on every request - including all higher-level directories(!!!).
So to squeeze out every inch of performance it’s better to disable them.
But agree with Y!!: For most sites this will not really make a difference. But if you need to do some serious tuning (and minimizing disk access is a crucial part here) it’s an important option, that one should keep in mind.