Engine23

NGINX remove index.php from url

When you use nginx, just like apache, by default the Magento URL has index.php. That is fine for Magento development, but very ugly and not search engine optimized. So, the fix, just like apache is a pretty simple one. I am not too sure if there are any implications to this version of removing it, but it seems to work. In you nginx configuration file, you need to add 1 line of code:

server { 
....
rewrite ^/index.php/(.*) /$1 permanent;
....
}

****UPDATE****

This may not work 100% as much as I had hoped. In the Magneto admin it was not allowing my caches to be cleared. You may need to turn on SEO Urls and maybe do some other tweaks to get this to work properly. If I can find an awesome solution I will be sure to update this.

Some Title with Additional Information

Lorem ipsum dolor sit amet, commune lucilius phaedrum ad sea, id sea sententiae incorrupte honestatis, mea eros invenire ad. Sit no esse munere contentiones. In duis dicunt prompta sit, appareat partiendo id eum, ad sit inermis dignissim. Eos eripuit nusquam accumsan at, eu tantas laoreet has. Adhuc scriptorem eam an, sonet partem platonem vix ei. Vel graecis singulis philosophia et, ut diam omittam per, vis no animal assentior dissentiet.

Test Image

Lorem ipsum dolor sit amet, commune lucilius phaedrum ad sea, id sea sententiae incorrupte honestatis, mea eros invenire ad. Sit no esse munere contentiones. In duis dicunt prompta sit, appareat partiendo id eum, ad sit inermis dignissim. Eos eripuit nusquam accumsan at, eu tantas laoreet has. Adhuc scriptorem eam an, sonet partem platonem vix ei. Vel graecis singulis philosophia et, ut diam omittam per, vis no animal assentior dissentiet.

If you are having any troubles implementing this, feel free to checkout out to our Magento support or for further SEO ideas reach out to our Search Engine Optimization team.

Share: