{"id":1637,"date":"2010-04-12T00:51:58","date_gmt":"2010-04-11T16:51:58","guid":{"rendered":"http:\/\/blog.myhz.com\/ivan\/2010\/04\/12\/dedecms5-5%e5%ae%8c%e7%be%8e%e5%ae%9e%e7%8e%b0%e4%bc%aa%e9%9d%99%e6%80%81%e7%9a%84%e6%96%b9%e6%b3%95nginx\/"},"modified":"2010-05-08T00:16:41","modified_gmt":"2010-05-07T16:16:41","slug":"dedecms5-5%e5%ae%8c%e7%be%8e%e5%ae%9e%e7%8e%b0%e4%bc%aa%e9%9d%99%e6%80%81%e7%9a%84%e6%96%b9%e6%b3%95nginx","status":"publish","type":"post","link":"https:\/\/ivan.xin\/?p=1637","title":{"rendered":"dedecms5.5\u5b8c\u7f8e\u5b9e\u73b0\u4f2a\u9759\u6001\u7684\u65b9\u6cd5(nginx)"},"content":{"rendered":"<p>Linux\u73af\u5883\u4e0bdedecms5.5\u5b9e\u73b0\u4f2a\u9759\u6001\u7684\u65b9\u6cd5,5.3\u5e94\u8be5\u4e5f\u9002\u7528\u3002<\/p>\n<p>1.\u9996\u5728\u5728\u540e\u53f0\u5f00\u542f\u4f2a\u9759\u6001.<\/p>\n<p>2.\u7136\u540e\u680f\u76ee\u548c\u6587\u7ae0\u8bbe\u7f6e\u6210\u52a8\u6001\u6d4f\u89c8.<\/p>\n<p>\u8bbe\u7f6e\u65b9\u6cd5\u4e3a\uff1a\u5728\u540e\u53f0\u7cfb\u7edf\u8bbe\u7f6esql\u91cc\u6267\u884c\u4ee5\u4e0b\u8bed\u53e5<\/p>\n<p>\u5c06\u6240\u6709\u6587\u6863\u8bbe\u7f6e\u4e3a\u201c\u4ec5\u52a8\u6001\u6d4f\u89c8\u201d\uff0cupdate dede_archives set ismake=-1<\/p>\n<p>\u5c06\u6240\u6709\u680f\u76ee\u8bbe\u7f6e\u4e3a\u201c\u4f7f\u7528\u52a8\u6001\u9875\u201d\uff0cupdate dede_arctype set isdefault=-1<\/p>\n<p>\u6539\u62101\u5c31\u662f\u9759\u6001\u3002\u52a8\u6001\u8f6c\u6362\u4e3a\u9759\u6001\u540e\u9700\u8981\u91cd\u65b0\u751f\u6210HTML\u3002<\/p>\n<p>3. nginx\u8bbe\u7f6e\u91cd\u5199\u89c4\u5219. \u5185\u5bb9\u4e3a:<\/p>\n<p>rewrite \"^\/list-([0-9]+)\\.html$\" \/plus\/list.php?tid=$1 last;<br \/>rewrite \"^\/list-([0-9]+)-([0-9]+)-([0-9]+)\\.html$\" \/plus\/list.php?tid=$1&amp;totalresult=$2&amp;PageNo=$3 last;<br \/>rewrite \"^\/view-([0-9]+)-1\\.html$\" \/plus\/view.php?arcID=$1 last;<br \/>rewrite \"^\/view-([0-9]+)-([0-9]+)\\.html$\" \/plus\/view.php?aid=$1&amp;pageno=$2 last;<br \/>break;<\/p>\n<p>4.\u4fee\u6539\/include\/channelunit.func.php\u6587\u4ef6<br \/>\n1\uff09if($isdefault==-1)<br \/>\n{<br \/>\n\/\/\u52a8\u6001<br \/>\n$reurl = $GLOBALS['cfg_phpurl'].\"\/list.php?tid=\".$typeid;<br \/>\n}<br \/>\n\u6539\u4e3a\uff1a<br \/>\nif($isdefault==-1)<br \/>\n{<br \/>\n\/\/\u52a8\u6001<br \/>\nif($cfg_rewrite == 'Y')<br \/>\n{<br \/>\n$reurl = $GLOBALS['cfg_cmsurl'].\"\/list-{$typeid}.html\";<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\n$reurl = $GLOBALS['cfg_phpurl'].\"\/list.php?tid=\".$typeid;<br \/>\n}<br \/>\n}<\/p>\n<p>2\uff09   global $cfg_typedir_df;<br \/>\n\u6539\u4e3a\uff1a<br \/>\nglobal $cfg_typedir_df,$cfg_rewrite;<\/p>\n<p>3\uff09if($rank!=0 || $ismake==-1 || $typeid==0 || $money&gt;0)<br \/>\n{<br \/>\n\/\/\u52a8\u6001\u6587\u7ae0<br \/>\nif($cfg_rewrite == 'Y')<br \/>\n{<br \/>\nreturn $GLOBALS[\"cfg_plus_dir\"].\"\/view-\".$aid.'-1.html';<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nreturn $GLOBALS['cfg_phpurl'].\"\/view.php?aid=$aid\";<br \/>\n}<br \/>\n}<br \/>\nelse<br \/>\n\u6539\u4e3a\uff1a<br \/>\nif($rank!=0 || $ismake==-1 || $typeid==0 || $money&gt;0)<br \/>\n{<br \/>\n\/\/\u52a8\u6001\u6587\u7ae0<br \/>\nif($cfg_rewrite == 'Y')<br \/>\n{<br \/>\nreturn $GLOBALS[\"cfg_cmsurl\"].\"\/view-\".$aid.'-1.html';<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nreturn $GLOBALS['cfg_phpurl'].\"\/view.php?aid=$aid\";<br \/>\n}<br \/>\n}<br \/>\nelse<\/p>\n<p>5.\u5bf9\u4e8e\u56fe\u7247\uff0c\u5728templets\/default\/article_image.htm\u548ctemplets\/default\/article_image_frame.htm\u4fee\u6539\u4e0b\u8fb9\u7684\u90e8\u5206<br \/>&nbsp;&nbsp;&nbsp; else<br \/>&nbsp;&nbsp;&nbsp; {<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(npage==2) {<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(namehand!='') location.href = namehand+shortname;<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \/\/else location.href = \"view.php?aid={dede:field name='id'\/}\";\/\/ html\u9759\u6001rewrite\u6ce8\u91ca<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else location.href = \"view-{dede:field name='id'\/}\";\/\/ html\u9759\u6001rewrite\u65b0\u52a0<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else if(displaytype=='st' &amp;&amp; namehand!='') {<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; location.href = namehand+\"_\"+(npage-1)+shortname;<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \/\/location.href = \"view.php?aid={dede:field name='id'\/}&amp;pageno=\"+(npage-1);\/\/html\u9759\u6001rewrite\u6ce8\u91ca<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; location.href = \"view-{dede:field name='id'\/}-\"+(npage-1)+\".html\";\/\/ html\u9759\u6001rewrite\u65b0\u52a0<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; \/\/\u4e0b\u4e00\u5f20<br \/>&nbsp;&nbsp;&nbsp; function dPlayNext()<br \/>&nbsp;&nbsp;&nbsp; {<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(npage==totalpage) { alert(\"\u6ca1\u6709\u4e86\u54e6\"); }<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \/\/&nbsp;&nbsp;&nbsp; if(displaytype=='st' &amp;&amp; namehand!='') location.href = namehand+\"_\"+(npage+1)+shortname;\/\/ html\u9759\u6001rewrite\u6ce8\u91ca<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \/\/&nbsp;&nbsp;&nbsp; else location.href = \"view.php?aid={dede:field name='id'\/}&amp;pageno=\"+(npage+1);\/\/html\u9759\u6001rewrite\u6ce8\u91ca<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(displaytype=='st' &amp;&amp; namehand!='') location.href = namehand+\"_\"+(npage+1)+shortname;\/\/ html\u9759\u6001rewrite\u65b0\u52a0<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else location.href = \"view-{dede:field name='id'\/}-\"+(npage+1)+\".html\";\/\/ html\u9759\u6001rewrite\u65b0\u52a0<br \/>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>\u6709\u4e00\u4e2a\u95ee\u9898\u5c31\u662f\u5982\u679c\u4f60\u662f\u91c7\u96c6\u7684\u6587\u7ae0\u6bcf\u6b21\u5bfc\u5165\u540e\u9700\u8981\u518d\u6b21\u8fd0\u884c update dede_archives set ismake=-1<br \/>\n\u884c\u5c06\u6240\u6709\u6587\u6863\u8bbe\u7f6e\u4e3a\u201c\u4ec5\u52a8\u6001\u6d4f\u89c8\u201d\u3002\u5176\u5b9e\u8fd0\u884c\u8fd9\u4e2a\u8bed\u53e5\u7528\u4e0d\u4e86\u51e0\u79d2\u949f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u73af\u5883\u4e0bdedecms5.5\u5b9e\u73b0\u4f2a\u9759\u6001\u7684\u65b9\u6cd5,5.3\u5e94\u8be5\u4e5f\u9002\u7528\u3002 1.\u9996\u5728\u5728\u540e\u53f0\u5f00\u542f\u4f2a\u9759\u6001. 2.\u7136\u540e...<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1637","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/1637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1637"}],"version-history":[{"count":0,"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/1637\/revisions"}],"wp:attachment":[{"href":"https:\/\/ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}