Basic Routing Question

I am brand new to Yii (1.1.4). I install and configure, and the demo app works !

The demo’s menu item ‘logon’ links to <<.../index.php?r=site/login>> which works, but seems to be a lousy URL to present to the world. How do I change the URL used to a more friendly <<.../login>>??

urlmanager option ‘urlFormat=>path’ gets URL <<.../index.php/site/login>>, which is at least a little better .

Adding option “‘showScriptName’=>false,” get URL <<.../site/login>> which is real close except that it doesn’t work! (server error - not found).

I have spent all day playing with the ‘rules’ option without finding a single one that had any effect whatsoever. No amount of reading the manual or forum posts about the subject seems to help at all – they all seem to be aimed at much more complex situations.

So how do I make the demo app use <<.../login>> to get to the login page??

If you set the showScriptName=false you have to edit/add a .htaccess file in the webroot.

See this wiki article.

Take care about this comment, if you use a documentroot alias.