Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Url Manager-Result Page"not Founf"

$
0
0
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:
'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.

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>