Knowledgebase
How to remove index.php from the URL in Magento
If the homepage of your Magento site has an URL address that has the form yourdomain.com/index.php, and pages on your site have URLs like yourdomain.com/index.php/category-name, yourdomain.com/index.php/product-name, etc. and you want them to be without the index.php part in them so that they look like yourdomain.com, yourdomain.com/category-name, etc., then you can do this directly from the admin panel of your Magento by changing the value of a single setting.
After you log in to the admin panel go to System menu>Configuration>Web button in the General section on the left>Search Engines Optimization panel on the right. Expand the panel by clicking on it, set the option Use Web Server Rewrites that's in it to Yes, and click on the Save Config button. Then refresh the frontend of your site and browse through it to see the result.
Magento also has built-in options that allow you to change the URL address of any particular category or product page on your site. For more information on this check out the tutorial on managing URL rewrites in Magento.