How to Remove index.php from URLs in Magento

  1. Change website configurationGo to System > Configuration > Web > Search Engine Optimization. Change ‘Use Web Server Rewrites’ to YES and save.
  2. Edit the .htaccess file

If your Magento store is installed in root (public_html) then add this to the end of the .htaccess file:

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

If your Magento store is installed in a subfolder (public_html/store) then add this to the end of the .htaccess file:

RewriteEngine On
RewriteBase /store/
RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /store/index.php [L]

Tags:
Nina Young About the author

I studied mathematics at university, taught myself software development, honed my skills with multinational companies such as IBM and have set up and sold my own businesses. My perspective covers the all important period when a business moves from small and successful to substantial and market-leading, and my personal experience allows me to provide online solutions that give business leaders mastery of their online presence and control over business development.

No Comments

Leave a Comment: