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.