Unable to resolve the request

Hi all,

I’m working with Yii2 advanced locally. Static pages for frontend and backend work fine. On the backend URL’s accept Id’s and render the page as intended. The viewProducts page is coming up with a [font=“Arial Black”]Not Found (#404) Error, Unable to resolve the request: site/viewProducts.[/font] I’ve reviewed lower & uppercase letters where action & file names are multiple words.

SiteController:


    public function actionIndex()

    {

    	$model = new Products();

	$id = $model->brand_id;

		

	if($model->load(Yii::$app->request->post()) )  

	{  

	        return $this->redirect(['viewProducts', 'id' => $model->brand_id]);

	} else {

		return $this->render('index', [

			'model' => $model,

		]);

	}    

    }



Common>Config>Main:


	     'urlManager' => [

		        'enablePrettyUrl' => false,

		        'showScriptName'  => false,

		        'rules' => array(

		        '<controller>/<action>/<id>' => '<controller>/<action>',

		        ),	 



htaccess:


RewriteEngine on


# If a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

# Otherwise forward it to index.php

RewriteRule . index.php

I’ve restarted Apache. Added additional rules to the urlManager. If anyone can shed additional light on the direction I need to move toward, I would greatly appreciate it. Thank you much!

The URL when you redirect should be : [‘view-products’]. It’s the way for actions with uppercases