SEO friendly URL in Magento
If you have noticed, by default magento urls contain index.php within it for every page. You can remove this easily.
How to remove index.php from Magento URL
To remove index.php from URL follow the steps:
1) Changes in Magento Backend
Go to the admin section of Magento.
In System -> Configuration -> Web -> Search Engines Optimizations, select YES.
In System -> Configuration -> Web -> Secure -> Use secure URLs in the frontend, select YES.
2) Changes in .htaccess file
Edit the /magento/apps/magento/htdocs/.htaccess and uncomment the line:
RewriteBase /magento/
If magento files are on root then
RewriteBase /
else
RewriteBase /sub/
where sub is the sub-directory which contains the magento files. Since my files are within the magento folder, I have used magento as my base.