Tuesday 3 April 2012

Magento: How do I remove “index.php” in url?

It is important to obtain a better site url and comply to SEO standard in terms of URL optimization. Magento has feature of url rewrite which allows you to rewrite each page url of your site to a more meaningful url. When you first installed Magento, each page url has an "index.php".

To get rid off of the index.php simply follow the following checklist.

1. First thing you need to do is to check the "Use Web Server Rewrites". Located in "Admin>System>Configuration>Web>Search Engine Optimization". [required]


2. Check if mod_rewrite on your apache server is enabled. [required]


3. Copy the content of .htaccess.sample in the magento root and paste it to a new file called .htaccess in the same directory. [optional]


4. Uncomment the statement: "RewriteBase /magento/" and change it to "RewriteBase /yourInstallationFolder" if you used subfolder installation. [required]


5. Refresh your magento cache. [required]


6. Make sure that the site configuration file in /etc/apache2/sites-available had the AllowOverride directive set to All. [required]

I hope this post would help you.

No comments:

Post a Comment