links not working

my links changes after i login. e.g after login i’m redirected to my homepage… http://localhost/myapp/index.php where i have some links. when i click on the links i get this error:

The requested URL /user/comments was not found on this server.

but when i access the page using this url http://localhost/myapp/index.php/site/index then i don’t get that error!

any1 can tell me what am i doing wrong?

Have you properly set your .htaccess file? If so, what are your URL patterns? have you tried /index.php/user/comments? How do you create the links? Do you use the controllerID->createUrl?