Wordpress in Localhost problem

Hello,
I have made a localhost to start improving my website totally, it has been going well, untill I faced the following issue:
I can access the wp admin panel and I can preview the main page, but if I want to preview posts, pages, and other I cant (404 not found)?!
I can create/edit pages but I cannot preview them...
In the phpmyadmin I have already changed the siteurl to localhost/mysite.
What could be the problem??