How do I get get clean URLs in twig templates When I use {{page.link}} or {{page.url}} in a template I am getting 

http://mysite.dev/index.php?p=pages/about/history 

when what I really want is 

http://mysite.dev/pages/about/history

The latter URL works fine on the site, but I'm using the above code to try and create a menu, and don't want the menu item linking to the first URL.

How do I fix this?
Documentation for removing index.php

http://buildwithcraft.com/help/remove-index.php

You might have to adjust the .htaccess code depending on your server.