How to structure robots.txt file for yii framework?

Maybe this link will helpful for you ( I hope ).

At that structure the robot.txt is under the www directory, next to the index.php, so I think you should put it into the /protected directory, next to the index.php :)

I solved this.

Take a look at:

You can create an Robots action in SiteController.

Then render to robots.php in view/sites.

Change UrlManager.