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
Page 1 of 1
Friendly Url Not Working
#2
Posted 10 August 2010 - 09:06 PM
try it with the default scaffold application and see if it is working first
tipstank.com - where I share my coding stuff
#3
Posted 11 August 2010 - 09:17 AM
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
Thanks
R
#4
Posted 11 August 2010 - 09:26 AM
'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
Share this topic:
Page 1 of 1

Help














