Manage URL

I have created a data-link in cgridview using CHtml::link, which should be redirected to images present in "images" folder.

But the images folder is outside the protected folder, so how can I change the url:

What I get: localhost/adi/index.php?r=images/imagename.png

What I need: localhost/adi/images/imagename.png




$imageUrl = Yii::app()->baseUrl . '/images/imagename.png';


$link = CHtml::link('Link Text', $imageUrl);



iam getting url configration problem inner pages are not displaying it is showing Link/pub/index.php

<li <?php echo ($data->permalink == ‘about’) ? ‘class=“current-menu-item”’ : ‘’ ?>><a href="<?php echo Yii::app()->createUrl(‘about’) ?>">About Majestic Xpress</a></li>

‘urlManager’ => array(

        'urlFormat' =&gt; 'path',


		


        'rules' =&gt; array(


		'&lt;controller:&#092;w+&gt;/&lt;id:&#092;d+&gt;'=&gt;'&lt;controller&gt;/view',


			'&lt;controller:&#092;w+&gt;/&lt;action:&#092;w+&gt;/&lt;id:&#092;d+&gt;'=&gt;'&lt;controller&gt;/&lt;action&gt;',


			'&lt;controller:&#092;w+&gt;/&lt;action:&#092;w+&gt;'=&gt;'&lt;controller&gt;/&lt;action&gt;',


            'gii'=&gt;'gii',


  'gii/&lt;controller:[&#092;w&#092;-]+&gt;'=&gt;'gii/&lt;controller&gt;',


  'gii/&lt;controller:[&#092;w&#092;-]+&gt;/&lt;action:&#092;w+&gt;'=&gt;'gii/&lt;controller&gt;/&lt;action&gt;',

‘gii/<controller:\w+>/<id:\d+>’ => ‘/view’,

'gii/&lt;controller:&#092;w+&gt;/&lt;action:&#092;w+&gt;/&lt;id:&#092;d+&gt;' =&gt; '/',


'gii/&lt;controller:&#092;w+&gt;/&lt;action:&#092;w+&gt;' =&gt; '/',


            'signin' =&gt; 'site/login',


            'signup' =&gt; 'site/signup',


            'news' =&gt; 'content/news',


            'news/&lt;slug:[A-Za-z0-9-]+&gt;' =&gt; 'content/newsItem',


            'contact' =&gt; 'site/contact',





            


            'search' =&gt; 'site/search',


            


            '&lt;controller:&#092;w+&gt;/&lt;id:&#092;d+&gt;' =&gt; '&lt;controller&gt;/view',


            


            'pages' =&gt; 'Content/redirect',


            //'import-duty-calculator'=&gt;'site/calculator',


            'svg-customs-duty-calculator'=&gt;'site/calculator',


            'faq'=&gt;'Content/faq',


            '&lt;url:[A-Za-z-]+&gt;' =&gt; 'Content/render',


            'email/verify/&lt;id:[A-Za-z0-9-]+&gt;'=&gt;'site/verify',


            


          


              'user/verify/&lt;id:[A-Za-z0-9-]+&gt;' =&gt; 'user/verify',





            '&lt;controller:&#092;w+&gt;/&lt;action:&#092;w+&gt;/&lt;id:&#092;d+&gt;' =&gt; '&lt;controller&gt;/&lt;action&gt;',


            '&lt;controller:&#092;w+&gt;/&lt;action:&#092;w+&gt;' =&gt; '&lt;controller&gt;/&lt;action&gt;',


        ),


        'showScriptName' =&gt; false,


    ),