{"id":60961,"date":"2025-04-26T12:09:41","date_gmt":"2025-04-26T04:09:41","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60961\/"},"modified":"2025-04-26T12:09:41","modified_gmt":"2025-04-26T04:09:41","slug":"nginx%e4%b8%8bzen-cart-1-5-1%e4%bc%aa%e9%9d%99%e6%80%81%e8%a7%84%e5%88%99","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60961\/","title":{"rendered":"Nginx\u4e0bzen cart 1.5.1\u4f2a\u9759\u6001\u89c4\u5219"},"content":{"rendered":"<p> Nginx\u4e0bzen cart 1.5.1\u4f2a\u9759\u6001\u89c4\u5219,\u5c06\u5176\u653e\u5728 \/usr\/local\/nginx\/conf\/ \u6587\u4ef6\u5939\u4e0b \u547d\u540d\u4e3azencart.conf<br \/> \u7136\u540e\u5728 \/usr\/local\/nginx\/conf\/vhost\/www.yourname.com.conf \u4e2d\u5c06include none.conf;&nbsp;\u6362\u6210include zencart.conf;\u5373\u53ef<\/p>\n<p> Zen Cart V1.5.1\uff0cUltimate SEO 2.212,lnmp\u6700\u65b0\u5b89\u88c5\u5305\u4e0b\u6d4b\u8bd5OK.<\/p>\n<p> # if the requested file exists, return it immediately<\/p>\n<p> if (-f $request_filename) {<\/p>\n<p> break;<\/p>\n<p> }<\/p>\n<p> #For Ultimate SEO URLs<\/p>\n<p> rewrite ^\/(.*)-c-([0-9_]+)\/(.*)-p-([0-9]+)(.*)$ \/index.php?main_page=product_info&amp;products_id=$2&amp;$args last;<\/p>\n<p> rewrite ^\/(.*)-c-([0-9]+)_([0-9]+)\/$ \/index.php?main_page=index&amp;cPath=$2_$3&amp;$args last;<\/p>\n<p> rewrite ^\/(.*)-c-([0-9]+)\/$ \/index.php?main_page=index&amp;cPath=$2&amp;$args last;<\/p>\n<p> rewrite ^\/(.*)-m-([0-9]+).html$ \/index.php?main_page=index&amp;manufacturers_id=$2&amp;$args last;<\/p>\n<p> rewrite ^\/(.*)-pi-([0-9]+).html$ \/index.php?main_page=popup_image&amp;pID=$2&amp;$args last;<\/p>\n<p> rewrite ^\/(.*)-pr-([0-9]+).html$ \/index.php?main_page=product_reviews&amp;products_id=$2&amp;$args last;<\/p>\n<p> rewrite ^\/(.*)-pri-([0-9]+).html$ \/index.php?main_page=product_reviews_info&amp;products_id=$2&amp;$args last;<\/p>\n<p> &nbsp;<\/p>\n<p> # For eazy pages<\/p>\n<p> rewrite ^\/(.*)-ezp-([0-9]+).html$ \/index.php?main_page=page&amp;id=$2&amp;$args last;<\/p>\n<p> &nbsp;<\/p>\n<p> # For Open Operations Info Manager<\/p>\n<p> rewrite ^\/(.*)-i-([0-9]+).html$ \/index.php?main_page=info_manager&amp;pages_id=$2&amp;$args last;<\/p>\n<p> &nbsp;<\/p>\n<p> # For dreamscape\u2019s News &amp; Articles Manager<\/p>\n<p> rewrite \u201c^news\/?\u201d \/index.php?main_page=news&amp;% last;<\/p>\n<p> rewrite \u201c^news\/rss.xml\u201d \/index.php?main_page=news_rss&amp;% last;<\/p>\n<p> rewrite \u201c^news\/archive\/?\u201d \/index.php?main_page=news_archive&amp;% last;<\/p>\n<p> rewrite \u201c^news\/([0-9]{4})-([0-9]{2})-([0-9]{2}).html\u201d \/index.php?main_page=news&amp;date=$1-$2-$3&amp;% last;<\/p>\n<p> rewrite \u201c^news\/archive\/([0-9]{4})-([0-9]{2}).html\u201d \/index.php?main_page=news_archive&amp;date=$1-$2&amp;% last;<\/p>\n<p> rewrite \u201c^news\/(.*)-a-([0-9]+)-comments.html\u201d \/index.php?main_page=news_comments&amp;article_id=$2&amp;% last;<\/p>\n<p> rewrite \u201c^news\/(.*)-a-([0-9]+).html\u201d \/index.php?main_page=news_article&amp;article_id=$2&amp;% last;<\/p>\n<p> &nbsp;<\/p>\n<p> # All other pages<\/p>\n<p> # Don\u2019t rewrite real files or directories<\/p>\n<p> rewrite \u201c^(.*).html\u201d \/index.php?main_page=$1&amp;% last;<\/p>\n<pre>\r\n\u7b2c\u4e09\u6b65\u91cd\u542fnginx\uff0c\u767b\u9646SSH\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff1a\/root\/lnmp restart<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Nginx\u4e0bzen cart 1.5.1\u4f2a\u9759\u6001\u89c4\u5219,\u5c06\u5176\u653e\u5728 \/usr\/local\/nginx\/conf\/ \u6587\u4ef6\u5939\u4e0b \u547d\u540d\u4e3azencart.conf \u7136\u540e\u5728 \/usr\/local\/nginx\/conf\/vhost\/www.yourname.com.conf \u4e2d\u5c06include none.conf;&nbsp;\u6362\u6210include zencart.conf;\u5373\u53ef Zen Cart V1.5.1\uff0cUltimate SEO 2.212,lnmp\u6700\u65b0\u5b89\u88c5\u5305\u4e0b\u6d4b\u8bd5OK. # if the requested file exists, return it immediately if (-f $request_filename) { break; } #For Ultimate SEO URLs rewrite ^\/(.*)-c-([0-9_]+)\/(.*)-p-([0-9]+)(.*)$ \/index.php?main_page=product_info&amp;products_id=$2&amp;$args last; rewrite ^\/(.*)-c-([0-9]+)_([0-9]+)\/$ \/index.php?main_page=index&amp;cPath=$2_$3&amp;$args last; rewrite ^\/(.*)-c-([0-9]+)\/$ \/index.php?main_page=index&amp;cPath=$2&amp;$args last; rewrite ^\/(.*)-m-([0-9]+).html$ \/index.php?main_page=index&amp;manufacturers_id=$2&amp;$args last; rewrite ^\/(.*)-pi-([0-9]+).html$ \/index.php?main_page=popup_image&amp;pID=$2&amp;$args last; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-60961","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=60961"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60961\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}