URL Manager no Parsing Internal Links

I am looking for a solution to a problem i have with internal links. Say i have an article and i want to have a link to another page


<a href="index.php?r=related/view&id=10&slug=very-nice-article">related</a>

My rules in url manager are set and working like charm, however when i get to a link done like above strange things happen


http://example.com/nice-articles/index.php?r=related/view&id=10&slug=very-nice-article

this the intended behavior


http://example.com/nice-articles/very-nice-articles-12

which works well with CHtml() or createUrl()

What’s the solution that works with internal links.