Url Manager Help

I know this topic has been discussed before, and I’ve attempted to learn from those discussions, but I have an issue that I can’t seem to find the answer to.

I want my url to be in the following format:


http://www.example.com/Availability

Where Availability is the name of the controller. It DOES work with the following url:


http://www.example.com/index.php/Availability

Here is my .htaccess:


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

Which was taken directly from http://www.yiiframework.com/doc/guide/1.1/en/topics.url .

And my config looks like this:


		'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>',

		    ),

		),

Any help is appreciated.

Is Apache mod_rewrite enabled on your server? Is AllowOverride set to All in your Apache config?

You’re awesome.

mod_rewrite was enabled, but AllowOverride was set to none.

It’s working now. Thank you.

No problem. You can also put the config items you currently have in your .htaccess file in your Apache config and turn AllowOverride back to None. This provides a nominal performance increase since Apache no longer has to look in every directory for .htaccess, and provides more security since Apache will no longer be executing stuff found in .htaccess files in your web-accessible directories.

sorry wrong topic