.htaccess - Yii url rewriting removing index.php
I am trying to make the url rewriting and i want to remove index.php and I have done some research and found the online documentation aswell.
Here is what i did so far i uncomnted my main.php urlmaneger and i have the following
'urlManager'=>array(
'urlFormat'=>'path',
'showScripName'=>false,
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
and i have .htaccess which is loacted in my yiiApplication
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
Now when I launch the application it gives me the following error.
**Property "CUrlManager.showScripName" is not defined.**
How do I fix this?I do have my Rewrite engine on and also i have no errors on my php log or wamp server log.
Should I rewrite all of my urls inside of my project?
Answer
Solution:
Rename to
showScriptName
, because you mistyped property name.It should be: