i am finalizing my work on Yii application and I want to have prettier URLs. I went through googling over sites and Yii wiki and went according the manuals. However, I am stuck at the point of being unable to hide index.php form my URL. With index.php in my url it works, the site opens, without it, it gices me server 404.
This is my main.config:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<action>'=>'site/<action>',
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
),
With 'showScriptName' set to false I get 404.
This is my .htaccess
RewriteEngine on
RewriteBase /
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php)
# otherwise forward it to index.php
RewriteRule ^(.+)$ index.php?$1 [PT,L,QSA]
I am currently testing the site on localhost using WAMP. Mod_rewrite on Apache is running. Changed http.conf to Options Indexes FollowSymLinks Allow Override All.
What else am I missing?