Help With Urls Route When Moving From Localhost To A Web Folder

I developed a web app on my localhost server, but when I moved it on a subfolder domain (named rent) some links not working as expected.

On my localhost, the link was <a href="/client-name-22/">Client Name</a>, but on the server the link must be <a href="/rent/client-name-22/">Client Name</a> to work properly. Of course , I don`t want to have hardcoded links (by adding rentprefix to all Urls).

So, in my config file I have something like this:


'urlManager' => array(

            'urlFormat' => 'path',

            'urlSuffix' => '/',

            'showScriptName' => false,

            'useStrictParsing' => false,

            'appendParams' => false,

            'rules'=>array(

                [b]<clientSlug:[\w\-]+>-<clientId:\d+>' => 'frontend/client/index'[/b]

                 ......



Is there any config param to resolve my issue?

may i see your code that is generating the url?

Of course:




{foreach $clients key=key item=client}

   <li><a data-target="#" href="/{$key}">{$client}</a></li>

{/foreach}



$clients = array(<slug> => <name>);

To work properly all links must be :




{foreach $clients key=key item=client}

   <li><a data-target="#" href="/rent/{$key}">{$client}</a></li>

{/foreach}



So simple:


$this->createUrl('client/index', array('client' => $key));