Opencart SEO url in Nginx sample

Here is my sample URL rewriting definition for opencart SEO links that I hope to be useful on other developers running in NGINX. Notice that I have /opencart/ as the path of my opencart installation.


    location /opencart/ {
        try_files $uri @opencart;

    location @opencart {
        rewrite ^/(.+)$ /opencart/index.php?_route_=$1 last;

    location /opencart/admin/ {
        index index.php;

    location ~* (\.(tpl|ini))$ {
    deny all;

Leave a Reply

Your email address will not be published. Required fields are marked *