Categories

Featured templates

Magento. How to remove ‘index.php’ from the website URL

Andre Flores April 21, 0205
Rating: 5.0. From 1 vote.
Please wait...

Hello! This video tutorial shows how to remove ‘index.php’ from the website URL in your Magento template.

Magento. How to remove ‘index.php’ from the website URL

‘Index.php’ can be successfully removed from the web-site URL only in case mod_rewrite module is enabled on your server. To check this, you may contact your server administrator/hosting provider.

Now, let’s learn how to remove ‘index.php’ from the website URL:

1. Click the System->Configuration tab:

magento_how_to_remove_index_php_from_website_url_1

2. On the appeared screen click "Web" tab under "General" on the left hand side of your admin panel. You will see the below screen:

magento_how_to_remove_index_php_from_website_url_2

3. Now set the "Use Web Server Rewrites" option under "Search Engines Optiomization" to "Yes".

4. Then, set the "Use Secure URLs in Frontend" option under "Secure" to "Yes". Click "Save Config" button in the top right:

magento_how_to_remove_index_php_from_website_url_3

5. Now we need to create an .htaccess file with the rewrite directives in the root of your Magento installation. You may use your hosting control panel File Manager or FTP to create a file.

Put the following code in the created file:

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

In case your Magento is installed in sub-folder, e.g. ‘shop’, you should use the following code:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /shop/index.php [L]
</IfModule>

6. Save the file and check your website.

The ‘index.php’ is successfully removed from the URL.

This is the end of the tutorial, we have learnt how to remove ‘index.php’ from the website URL in Magento templates.

Feel free to check the detailed video tutorial below:

Magento. How to remove ‘index.php’ from the website URL

Templates for Magento
This entry was posted in Magento Tutorials and tagged index.php, Magento, remove, url. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket

  • charnjit

    Thanks…

    No votes yet.
    Please wait...
Live Chat
We help you to choose the right product.