This should work for you. Add this rule /profile/*
into your config.php in components urlManager part. Params like "username" should be forwarded automatically by Yii.
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName' => false,
'rules'=>array(
'/profile/*' => array('/site/profile/'),
),
),
Also check your .htaccess and allow Rewrite.
Options +FollowSymlinks
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