April 9, 2015

Magento - How to remove index.php from site URL?


If you wan to remove index.php from site URL then tis easy and follow following 6-7 step

1) Log-in to your Magento administration area then go to 'System > Configuration > Web'.

2) Navigate to the 'Unsecure' and 'Secure' tabs. Make sure the 'Unsecured' and 'Secure' - 'Base Url' options have your domain name within it, and do not leave the forward slash off at the end of the URL. Example: http://www.yourdomain.co.uk/

3) While still on the 'Web' page, navigate to 'Search Engine Optimisation' tab and select 'YES' underneath the 'Use Web Server Rewrites' option.

4) Navigate to the 'Secure' tab again (if not already on it) and select 'Yes' on the 'Use Secure URLs in Frontend' option.

5) Now go to the root of your Magento website folder and use this code for your .htaccess:

6) Now go to 'System > Cache Management' and select all fields and make sure the 'Actions
dropdown is set on 'Refresh', then submit.

If your site in root the add following code in .htaccess file of your server root.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


Now refresh home page and see result!

2 comments:

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...