Page Not Found Message Error

Hi everyone,

when I click one the menu item of my page, I get this error message "The requested URL /testYii/index.php/mywebpages/view/controllers/introduction was not found on this server". Could anyone help me fix the issue please?

My control file name is MywebpagesController.php and this is it content:



	class MywebpagesController extends Controller


		public function actionIndex()





		public function actionIntroduction()




		public function actionIntroduction()






This is my /protected/views/layouts/main.php file content:

	<div class="backgroundGeneral">

		<div id="mainmenu">

			<?php $this->widget('zii.widgets.CMenu',array(


					array('label'=>'Accueil', 'url'=>array('/site/index')),

					array('label'=>'Teaching', 'url'=>array('/mywebpages', 'view'=>'controllers/introduction')),

					array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),				

					array('label'=>'login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),

					array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),

					array('label'=>'Forum', 'url'=>array('/site/pages/forum')),

					array('label'=>'Tools', 'url'=>array('/site/pages/tools')),

					array('label'=>'Contact', 'url'=>array('/site/contact')),


			)); ?>

</div><!-- mainmenu -->

This is the /protected/config/main.php file content

return array(


	'name'=>'My web site',

	//gtf ... 'defaultController' => 'home',

	// preloading 'log' component


	// autoloading model and component classes




		'application.controllers.*', //

		'application.classes.*', //











Finally, I have the following configuration:



Thank you in advance

Obviously, you have a wrong URL generated by Menu component.

The right one should be "/mywebpages/introduction".

I think you should change

'url'=>array('/mywebpages', 'view'=>'controllers/introduction')



but check the documentation on this (I have no idea how zii.widgets work)

Thank you ORey for your answer. I set this url


There is no longer error. Instead I’ve now a full white page.

You have two actions with the same name (I wonder why exception was not thrown), view in the unusual place and so on.

Plz start with the blog tutorial.

public function actionIntroduction()




remove this action from your controller I think this action is causing problem

I did not put the word "Controller" into the name of the controller file. That was the cause of the trouble.