PHP+CMS+网站 · 2021年12月9号 0

OpenCart 3.x nginx 静态化规则

[code]

location = /sitemap.xml {
rewrite ^(.*)$ /index.php?route=feed/google_sitemap break;
}

location = /googlebase.xml {
rewrite ^(.*)$ /index.php?route=feed/google_base break;
}

location / {
try_files $uri $uri/ @opencart;
}

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

[/code]