How to create profile url (http://sitename/username/) in cakephp

(1)Create a profile controller app/Controller/ProfileController.php and write following code

<?php
App::uses('AppController', 'Controller');

class ProfileController extends AppController {


	public function index() {
		
		 $username = $this->params['username']; 
	 
		 
	}
}
?>

(2)create a view file app/View/profile/index.ctp

(3)Open file app/Config/routes.php and add following line

<?php
	Router::connect('/:username', array('controller' => 'profile', 'action'=> 'index')); 
?>