Remove index.php from the Magento URLs

Remove index php from the Magento

Remove index.php from the Magento is one of the best way to increase SEO for website, we can remove the index.php using Magento admin section in two easy steps, no need to make and coding.

1st) Remove index.php using Magento admin section

Login into Magento admin section as a admin then “Go to System > Configuration > Web > Search Engine Optimization” and set

Use Web Server Rewrites: YES

2nd) Open the .htaccess file and the following code, but make sure that you are using correct code in .htaccess file as per your Magento installation, read following case code carefully and use it.

Case 1 : If Magento store is installed in root i.e public_html directory then use code

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

Case 2 : If Magento store is installed in a subfolder i.e public_html/myshop then use code

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

 

About Anant 373 Articles
Senior technical writer