Remove index.php from site url – magento

Go to system -> configuration and click on the option (sidebar menu) “Web” under the main category “general” 

Then enable ” Use Web Server Rewrites “ to yes .