I am creating a link around an image like this:
$referralImg = CHtml::image("/images/btn-referral.png", "Submit a Referral", array('id'=>'referral_img'));
echo CHtml::link($referralImg, array("user/login"));
This image is on the top of every page. When I am on my index page mydomain.com and I click the button I get redirected to mydomain.com/user/loign (Which is what I want it to do)
But when I am on that page and click on the same button I get redirected to mydomain.com/user/user/login
I don’t understand why the link is being created like that.
Here are my url rules
'rules'=>array(
'admin' => 'admin/default',
'<controller:\w+>/<action:(professional-staff)+>'=>'<controller>/professional_staff',
'<controller:\w+>/<action:(helpful-resources)+>'=>'<controller>/helpful_resources',
'<controller:\w+>/<action:\w+>'=>'<action>',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
Thanks for any help
Fletch