queej, on 08 February 2010 - 07:24 PM, said:
Thank you. I tried that, with various permutations on the case of the letters, but always get the message:
Unable to resolve the request "course/page".
If you want to access your course/page action by the url
http://site.com/CoursePage, then you need a configuration for the url manager like this:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'CoursePage'=>'course/page',
),
),
Also you'll need to edit .htaccess:
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
Now you can generate links in your application using CHtml::link():
echo CHtml::link('Course page', array('/course/page'));