menu

Tuesday 11 August 2015

how to remove index.php from url in magento

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:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Save the .htaccess and replace the original file. (PLEASE MAKE SURE TO BACKUP YOUR ORIGINAL .htaccess FILE BEFORE MESSING WITH IT!!!)
6) Now go to 'System > Cache Management'     refresh


logout  and enjoy.

2 comments: