How To Remove Index.php From Your URL

How to remove index.php from url in magento

Ans :

If you want to access your magento URL without index.php

for example:

http://domain.com/index.php/category

to

http://domain.com/category

then use the following steps

1) Login to your admin section by using the URL

http://domain.com/index.php/admin

2) then go to “System >>  Configuration >>Web >> Search Engines Optimization”
Use Web Server Rewrites : YES

3) Go to “System >>  Configuration >>Web >>Secure”

Use secure URL Frontend: YES

4)Then create the .htaccess file under your magento installed folder.

If magento is installed under the document root ( /home/username/public_html) then add the following rules into .htaccess file


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

and If magento is installed under /shop or directory then add the following rules into ” /home/username/public_html/shop/.htaccess ” file.


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

  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

How to resolve the file permissions error in Magento Connect Manager?

      NOTE: If you do not have SSH access, or have any issues contact Simple Servers Support...

How to fix the Magento Out of stock bug, version 1.1.x

This is a popular bug that has been plaguing many people with their custom Magento solutions....

How Multiple Websites & Stores Work

Global | Website | Store | Store View   One of Magento's advanced features allows for...

How to Change magento welcome E-mail Messages

Magento default E mail messages show sender-magento team and there have default email...

How to import images into Magento

This isn't so obvious but there are two parts to successfully import images into magento: 1)...