Removing index.php from Magento URLs
By default Magento 1 URLs can include index.php, which looks untidy and is not ideal for search engines. Two quick changes remove it.
1. Enable rewrites in the admin
Open System > Configuration > Web > Search Engine Optimization and set Use Web Server Rewrites to Yes. Then refresh the cache from Cache Management.
2. Check the rewrite base
Open the .htaccess file in your Magento root and find the commented #RewriteBase /magento/ line. Uncomment it and set it to the folder Magento is installed in, or / if it sits at the domain root.
On Nginx there is no .htaccess, so the equivalent rewrite needs to go in the server block instead.
Need a second pair of eyes on this? Our team handles Magento development every week. See how we can help.