Implemented my project in Yii on Apache server.It is working fine.I want to hideindex.php in the url both in production and local server ,are running on Apache.
I tried with below config.
'show Script Name'=>false,
but its not working.
Implemented my project in Yii on Apache server.It is working fine.I want to hideindex.php in the url both in production and local server ,are running on Apache.
I tried with below config.
'show Script Name'=>false,
but its not working.
property "showScriptName" should be without spaces.
array(
......
'components'=>array(
......
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName' => false
),
),
);
don't forget enable mod_rewrite for apache and create .htaccess file in webroot directory with
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
also I recommend you to read this UrlManager guide: http://www.yiiframework.com/doc/guide/1.1/en/topics.url