A lot of people get the very annoying problem in Magento where “index.php” shows up in their URLs. If you try to type in “store.com” the page will load as “store.com/index.php”. This happens on sub-pages too; if you go to a product or category you’ll see “store.com/index.php/widgets/gizmo.html”.
The solution for this problem can be tricky. There are a number of factors that contribute to how your domain is displayed in Magento and you need to make sure everything is configured properly. The settings to check for include…
99% of all Magento installations run on the Linux powered Apache Web Server. Apache includes a module called “mod_rewrite” which allows an installed application to rewrite the URLs that will be requested by visitors. This feature is generally installed and enabled by default, but you should confirm this if you’re seeing index.php in your URLs.
Magento Web Server Rewrites
Go into your Magento admin and navigate to System > Configuration > Web > Search Engine Optimization > Use Web Server Rewrites and make sure the option is set to “enable”.
.htaccess AllowOverride_All and RewriteBase
On your server you should find an important file labeled “.htaccess“. This file controls certain aspects of how your site is displayed, loaded, and interacted with. You want to make sure you have two lines in this file and that neither is preceded with a “#” (which is a way of commenting out a line of code from being active). Open up this file and make sure that AllowOverride_All is present and that RewriteBase is both present and followed by the directory where you have Magento installed (i.e. “/” for a root directory installation or something like “/store/” if you site is set up at exmample.com/store).
One other thing to note, your server can have multiple .htaccess files depending on how Apache was installed and configured. Do a search on your system to make sure that any other .htaccess files (sometimes found in various subdirectories) have the above settings as well.
Remember to clear the cache from Magento and your browser as well as restart Apache to ensure all your changes have taken effect and you should hopefully be free of index.php!
The Commative Team