Yii under Nginx

I'm running the latest stable Nginx and trying to get rewrites working for Yii. I've read the related cookbook article but no CSS is being used, and only the home page shows up. Any other page access results in a 404 error.

Here's what I've done...

In protected/config/main.php I have the following related to UrlManager:

'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,

In the nginx.conf file, I have these rewrite rules in place, per the cookbook:

# The location is /
# Rewrite all other URLs
if (!-e $request_filename) {
#rewrite ^/(.+)$ /index.php?url=$1 last; // This is the CakePHP rule that works
rewrite (.*) /index.php/$1;
break;
}

I've also added the fcgi_param PATH_INFO $fastcgi_script_name directive to the fastcgi config in nginx.conf.

It's probably fairly simple but no matter what I try, I get 404 errors after the home page and there's no CSS.

So it looks like the cookbook method does work, but I have to define rewrite rules for each controller. Is that right?

Also, when messing around with the 'First Yii App' in the definitive guide, logging in redirects me back to the home page (as a logged in user) but shows index.php in the address bar even with showScriptName=>false.

Isn't there a way to have the rewrite rule for the entire app, and how can I hide the script name on redirect?