This is quite simple, you will need a rule like this in the url manager:
//$_GET['username'] will return the value if it is a match.
But you need to have in mind that, you will have some issues with the other pages of the website, therefore, you need to pass a url rewrite rule for each of them and these rules must come before the above rule, so you would have:
[... all other rules here...]
Now, regarding the prevention of certain names usage, this is also simple,
In the registration process, define a array (or load a database table having forbidden names) and if the username choosen by the user matches one of the forbidden ones, just let the user know this and let him take another username.
where the last rule is reponsible to forward www.mydomain.com/test to pass page param to pagecontroller with action show. the problem I now have is that if I go to other urls like www.domain.com/gii he is routing to my pagecontroller. am i doing something wrong here, i thought if i add this as the last route it should pick than the available one.