Search This Blog

Mar 27, 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. Please let me know in comment if you have some questions.

4 comments:

cebu web hosting said...

great blog post...
This is such a very informative post. Thank you for sharing this to us.

Janzell Jurilla said...

Hi Cebu web hosting! Thanks for dropping by.

Nickolei Angeles said...

Very helpful post for those who are beginners in this aspects. Thanks for sharing and keep on helping others about this things.

PHP Web Programmer

Janzell Jurilla said...

@Nick

Hi, thanks for dropping by.:))

Janzell