How do I config NGINX to omit 'index.php' in URL

I set ‘auto index’ to ‘on’ and when I visit domain.com/t it will automatically redirect to domain.com/t/index.php problem is when I visit URLs like domain.com/t/book which represents for domain.com/t/index.php/book it’s an 404.

How to omit index.php in every URL completely?

I never tried Yii under nginx, but something like this should work:




location / {

        try_files $uri $uri/ /index.php?$args;

    }



http://code.google.com/p/yii/source/browse/trunk/docs/guide/quickstart.apache-nginx-config.txt

Sorry for late update. Thank you all, I have solved my problem.

As far as I know, the documentation you’ve mentioned is not with any tutorial or any downloads.

Hope this important document will be in the tutorial someday.

It’s pretty new. Will be online with next Yii release.