Friendly Url Not Working

Hi All,

I’m having a problem with the friendly url feature where it is not working.

I want to enter "http://mysite.com/ep" and have it route to "http://mysite.com/employees/profile"

My config is as follows:

‘urlManager’=>array(

        'urlFormat'=>'path',


		'showScriptName'=>false,


                    'rules'=>array('ep'=>'employees/profile'),


    ), 

my .htaccess also has :

RewriteEngine On

IndexIgnore /

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ index.php/$1 [L]

Any help would be greatly appreciated.

R

try it with the default scaffold application and see if it is working first

Figured it out. Didn’t have the correct order for the rules. It’s not as obvious when reading the documentation and maybe some further examples would be helpful for others.

Thanks

R




'urlManager'=>array(

			'urlFormat'=>'path',

			'urlSuffix'=>'.html',

			'showScriptName' => false,

			'rules'=>array(

				'page/<view>'=>array('site/page'),

				'index'=>array('site/index'),

				'contact'=>array('site/contact'),

				'login'=>array('user/login'),

				'logout'=>array('user/logout'),

				'registration'=>array('user/registration'),

				'recovery'=>array('user/recovery'),






Options +FollowSymLinks

IndexIgnore */*

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