Hi there.
I wanted to change the application URL Address because of selecting language option for end-users. I enable the apache rewrite module, creating a .htaccess file in the main application root for rewrite engine, add these rules in config/mani.php:
Creating CTUrlManager class extends CUrlManager for overriding createUrl method.
Now, When i click a link which created by createUrl() the browser bring the page "Not Found", But if the urlManager that set in the config/main.php is commented, everything is ok and it work very well in the common url format.
I wanted to change the application URL Address because of selecting language option for end-users. I enable the apache rewrite module, creating a .htaccess file in the main application root for rewrite engine, add these rules in config/mani.php:
'urlManager' => array(
'class' => 'CTUrlManager',
'urlFormat' => 'path',
'showScriptName' => false,
'caseSensitive' => FALSE,
'appendParams' => true,
'cacheID' => 'cache',
'urlSuffix' => '.html',
'rules' => array(
'<language:(en|fa)>/<_c>/<_a>/*' => '<_c>/<_a>/',
'<language:(en|fa)>/<_m>/<_c>/<_a>/*' => '<_m>/<_c>/<_a>/',
),
),Creating CTUrlManager class extends CUrlManager for overriding createUrl method.
Now, When i click a link which created by createUrl() the browser bring the page "Not Found", But if the urlManager that set in the config/main.php is commented, everything is ok and it work very well in the common url format.