Urlmanager Problem With Linux Ubuntu Server

when i set ‘showScriptName’=>false




'urlManager'=>array(

			'urlFormat'=>'path',

			'showScriptName'=>false,

			'rules'=>array(

				'<controller:\w+>/<id:\d+>'=>'<controller>/view',

				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

			),

		),



is not working with my linux ubuntu server, its working in my local wamp.

is there any solution?

Can you specify what isn’t working? Do you mean that when you use createUrl, you get an url containing the script name?

no the url is without index.php, the the url is not found error

Is it a Yii error page that you see or an error page from your webserver (Apache, nginx, …)?

In the latter case the server probably ignores your .htaccess file. That’s pretty common. For Apache you can allow .htaccess files by adding this to your VirtualHost section in the Apache config file:




<Directory "/path/to/your/webroot">

    AllowOverride All

</Directory>

You may already have such a Directory block in your config. It’s fine to add AllowOverride All there.

Alternatively you can also add the required mod_rewrite rules directly to the config file (which is slightly faster, because Apache doesn’t have to look for changed .htaccess files on every request).

yes mike the problem solved. its not only related to .htaccess, but also related to some other access in the server…

HI, Rajith, i’m also getting face same problem, where i need to change. pls help me.

Its can be due to htaccess not allowed by apache. Please add below code in your apcahe config file.

<Directory “/path/to/your/webroot”>

AllowOverride All

This works for me, May be help to other.