{"id":31992,"date":"2024-11-25T14:20:22","date_gmt":"2024-11-25T06:20:22","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31992\/"},"modified":"2024-11-25T14:20:22","modified_gmt":"2024-11-25T06:20:22","slug":"dede%e5%8e%bb%e6%8e%89index-html","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31992\/","title":{"rendered":"dede\u53bb\u6389index.html"},"content":{"rendered":"<blockquote><p>\n  dede\u53bb\u6389index.html\u7684\u65b9\u6cd5\uff1a1\u3001\u66ff\u6362index.php\u7684\u5185\u5bb9\u751f\u6210\u52a8\u6001\uff1b2\u3001\u76f4\u63a5\u5220\u9664cms\u6839\u76ee\u4e0b\u7684index.php\u6587\u4ef6\uff1b3\u3001\u4f7f\u7528htaccess\u6587\u4ef6\u53bb\u6389index.html\uff1b4\u3001\u5728\u4e3b\u673a\u91cc\u9762\u8bbe\u7f6e\u9ed8\u8ba4\u9996\u9875\u987a\u5e8f\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202105\/26\/2021052610503146208.jpg\" class=\"aligncenter\" title=\"dede\u53bb\u6389index.html\u63d2\u56fe\" alt=\"dede\u53bb\u6389index.html\u63d2\u56fe\" \/><\/p>\n<p>\u672c\u6587\u64cd\u4f5c\u73af\u5883\uff1aWindows7\u7cfb\u7edf\u3001DedeCMS5.6\u7248\uff0cDELL G3\u7535\u8111<\/p>\n<p>Dede\u9ed8\u8ba4\u751f\u6210\u9996\u9875\u540e\uff0c\u9996\u9875\u7684\u94fe\u63a5\u540e\u9762\u4f1a\u591a\u51fa\u4e00\u4e2aindex.html\u3002\u636e\u5b98\u65b9\u8bf4\u6cd5\u8fd9\u6837\u6709\u5229\u4e8e\u7f51\u7ad9\u4f18\u5316\u3002<\/p>\n<p>\u4f46\u662f\u8fd9\u4e2aindex.html\u600e\u4e48\u770b\u90fd\u4e0d\u8212\u670d\uff0c\u800c\u4e14\u4e5f\u4e0d\u5229\u4e8eseo\u4e2d\u4e3b\u9875url\u7684\u7edf\u4e00\u3002\u56e0\u4e3a\u6211\u7684\u7f51\u7ad9\u7684url\u7528.htaccess\u8f6c\u5411\u7edf\u4e00\u90fd\u662fwww,\u800c\u5e26.com\u7ed3\u5c3e\u7684\u3002<\/p>\n<p>\u6240\u4ee5\u51fa\u4e8e\u4e0d\u8ba9\u9996\u9875\u6743\u91cd\u5206\u6563\u8003\u8651\uff0c\u540c\u65f6\u4e5f\u662f\u7f8e\u89c2\u8003\u8651\uff0cdede\u9996\u9875\u7684index.html\u8fd8\u662f\u5f97\u53bb\u6389\u597d\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u7f51\u4e0a\u7ed9\u51fa\u7684dede\u9996\u9875\u53bb\u6389index.html\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<p>1.\u6309\u5b98\u65b9\u7ed9\u7684\u66f4\u65b0\u8bf4\u660e \u66ff\u6362index.php\u7684\u5185\u5bb9 \u751f\u6210\u52a8\u6001\uff0c<\/p>\n<p>\u5982\u679c\u9996\u9875\u4e0d\u9700\u8981\u751f\u6210HTML\u7684, \u628aindex.php\u6362\u6210\u4e0b\u9762\u4ee3\u7801<\/p>\n<pre>&lt;?php if(!file_exists(dirname(__FILE__).&#039;\/data\/common.inc.php&#039;))\n{\nheader(&#039;Location:install\/index.php&#039;);\nexit();\n}\nrequire_once (dirname(__FILE__) . \"\/include\/common.inc.php\");\nrequire_once DEDEINC.\"\/arc.partview.class.php\";\n$GLOBALS[&#039;_arclistEnv&#039;] = &#039;index&#039;;\n$row = $dsql-&gt;GetOne(\"Select&nbsp;*&nbsp;From&nbsp;`dede_homepageset`\");\n$row['templet']&nbsp;=&nbsp;MfTemplet($row['templet']);\n$pv&nbsp;=&nbsp;new&nbsp;PartView();\n$pv-&amp;gt;SetTemplet($cfg_basedir&nbsp;.&nbsp;$cfg_templets_dir&nbsp;.&nbsp;\"\/\"&nbsp;.&nbsp;$row['templet']);\n$pv-&amp;gt;Display();\n?&amp;gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5f53\u7136\u5982\u679c\u8981\u751f\u6210html\u5c31\u4e0d\u884c\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>2.\u76f4\u63a5\u5220\u9664CMS\u6839\u76ee\u4e0b\u7684index.php\u6587\u4ef6\uff0c<\/p>\n<p>\u8fd9\u4e2a\u529e\u6cd5\u770b\u4f3c\u6700\u7b80\u5355\uff0c\u4f46\u662f\u6211\u81ea\u5df1\u8bd5\u8fc7\u540e\u5374\u4e0d\u6210\u529f\u3002\u800c\u4e14\u5220\u9664\u540e\u4e5f\u6ca1\u529e\u6cd5\u4f7f\u7528\u52a8\u6001\u6d4f\u89c8\u4e86\u3002<\/p>\n<p>3.\u4f7f\u7528.htaccess\u6587\u4ef6<\/p>\n<p>\u76ee\u524d\u4f7f\u7528\u7684\u662f\u8fd9\u4e2a\u529e\u6cd5\uff0c\u8bd5\u9a8c\u6210\u529f\u3002<\/p>\n<p>\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<p>\u5728\u6839\u76ee\u5f55\u7684.htaccess\u91cc\u52a0\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>DirectoryIndex&nbsp;index.html&nbsp;index.php&nbsp;index.htm<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5c31\u8fd9\u4e48\u7b80\u5355\u3002<\/p>\n<p>4.\u5728\u4e3b\u673a\u91cc\u9762\u8bbe\u7f6e\u9ed8\u8ba4\u9996\u9875\u987a\u5e8f\uff1a\u628aindex.html\u63d0\u5230\u6700\u524d\u9762\u3002<\/p>\n<p>\u56e0\u4e3b\u673a\u4e0d\u540c\uff0c\u8bbe\u7f6e\u65b9\u6cd5\u4e5f\u4e0d\u540c\u3002\u5c31\u4e0d\u5177\u4f53\u7ec6\u8bf4\u4e86\u3002<\/p>\n<p>\u76f8\u5173\u63a8\u8350\uff1a\u300a\u300b<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fdede\u53bb\u6389index.html\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>dede\u53bb\u6389index.html\u7684\u65b9\u6cd5\uff1a1\u3001\u66ff\u6362index.php\u7684\u5185\u5bb9\u751f\u6210\u52a8\u6001\uff1b2\u3001\u76f4\u63a5\u5220\u9664cms\u6839\u76ee\u4e0b\u7684index.php\u6587\u4ef6\uff1b3\u3001\u4f7f\u7528htaccess\u6587\u4ef6\u53bb\u6389index.html\uff1b4\u3001\u5728\u4e3b\u673a\u91cc\u9762\u8bbe\u7f6e\u9ed8\u8ba4\u9996\u9875\u987a\u5e8f\u3002 \u672c\u6587\u64cd\u4f5c\u73af\u5883\uff1aWindows7\u7cfb\u7edf\u3001DedeCMS5.6\u7248\uff0cDELL G3\u7535\u8111 Dede\u9ed8\u8ba4\u751f\u6210\u9996\u9875\u540e\uff0c\u9996\u9875\u7684\u94fe\u63a5\u540e\u9762\u4f1a\u591a\u51fa\u4e00\u4e2aindex.html\u3002\u636e\u5b98\u65b9\u8bf4\u6cd5\u8fd9\u6837\u6709\u5229\u4e8e\u7f51\u7ad9\u4f18\u5316\u3002 \u4f46\u662f\u8fd9\u4e2aindex.html\u600e\u4e48\u770b\u90fd\u4e0d\u8212\u670d\uff0c\u800c\u4e14\u4e5f\u4e0d\u5229\u4e8eseo\u4e2d\u4e3b\u9875url\u7684\u7edf\u4e00\u3002\u56e0\u4e3a\u6211\u7684\u7f51\u7ad9\u7684url\u7528.htaccess\u8f6c\u5411\u7edf\u4e00\u90fd\u662fwww,\u800c\u5e26.com\u7ed3\u5c3e\u7684\u3002 \u6240\u4ee5\u51fa\u4e8e\u4e0d\u8ba9\u9996\u9875\u6743\u91cd\u5206\u6563\u8003\u8651\uff0c\u540c\u65f6\u4e5f\u662f\u7f8e\u89c2\u8003\u8651\uff0cdede\u9996\u9875\u7684index.html\u8fd8\u662f\u5f97\u53bb\u6389\u597d\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u7f51\u4e0a\u7ed9\u51fa\u7684dede\u9996\u9875\u53bb\u6389index.html\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a 1.\u6309\u5b98\u65b9\u7ed9\u7684\u66f4\u65b0\u8bf4\u660e \u66ff\u6362index.php\u7684\u5185\u5bb9 \u751f\u6210\u52a8\u6001\uff0c \u5982\u679c\u9996\u9875\u4e0d\u9700\u8981\u751f\u6210HTML\u7684, \u628aindex.php\u6362\u6210\u4e0b\u9762\u4ee3\u7801 &lt;?php if(!file_exists(dirname(__FILE__).&#039;\/data\/common.inc.php&#039;)) { header(&#039;Location:install\/index.php&#039;); exit(); } require_once (dirname(__FILE__) . &#8220;\/include\/common.inc.php&#8221;); require_once DEDEINC.&#8221;\/arc.partview.class.php&#8221;; $GLOBALS[&#039;_arclistEnv&#039;] = &#039;index&#039;; $row = $dsql-&gt;GetOne(&#8220;Select&nbsp;*&nbsp;From&nbsp;`dede_homepageset`&#8221;); $row[&#8216;templet&#8217;]&nbsp;=&nbsp;MfTemplet($row[&#8216;templet&#8217;]); $pv&nbsp;=&nbsp;new&nbsp;PartView(); $pv-&amp;gt;SetTemplet($cfg_basedir&nbsp;.&nbsp;$cfg_templets_dir&nbsp;.&nbsp;&#8220;\/&#8221;&nbsp;.&nbsp;$row[&#8216;templet&#8217;]); $pv-&amp;gt;Display(); ?&amp;gt; \u767b\u5f55\u540e\u590d\u5236 \u5f53\u7136\u5982\u679c\u8981\u751f\u6210html\u5c31\u4e0d\u884c\u4e86\u3002 &nbsp; 2.\u76f4\u63a5\u5220\u9664CMS\u6839\u76ee\u4e0b\u7684index.php\u6587\u4ef6\uff0c \u8fd9\u4e2a\u529e\u6cd5\u770b\u4f3c\u6700\u7b80\u5355\uff0c\u4f46\u662f\u6211\u81ea\u5df1\u8bd5\u8fc7\u540e\u5374\u4e0d\u6210\u529f\u3002\u800c\u4e14\u5220\u9664\u540e\u4e5f\u6ca1\u529e\u6cd5\u4f7f\u7528\u52a8\u6001\u6d4f\u89c8\u4e86\u3002 3.\u4f7f\u7528.htaccess\u6587\u4ef6 \u76ee\u524d\u4f7f\u7528\u7684\u662f\u8fd9\u4e2a\u529e\u6cd5\uff0c\u8bd5\u9a8c\u6210\u529f\u3002 \u65b9\u6cd5\u5982\u4e0b\uff1a \u5728\u6839\u76ee\u5f55\u7684.htaccess\u91cc\u52a0\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a DirectoryIndex&nbsp;index.html&nbsp;index.php&nbsp;index.htm \u767b\u5f55\u540e\u590d\u5236 \u5c31\u8fd9\u4e48\u7b80\u5355\u3002 4.\u5728\u4e3b\u673a\u91cc\u9762\u8bbe\u7f6e\u9ed8\u8ba4\u9996\u9875\u987a\u5e8f\uff1a\u628aindex.html\u63d0\u5230\u6700\u524d\u9762\u3002 \u56e0\u4e3b\u673a\u4e0d\u540c\uff0c\u8bbe\u7f6e\u65b9\u6cd5\u4e5f\u4e0d\u540c\u3002\u5c31\u4e0d\u5177\u4f53\u7ec6\u8bf4\u4e86\u3002 \u76f8\u5173\u63a8\u8350\uff1a\u300a\u300b \u4ee5\u4e0a\u5c31\u662fdede\u53bb\u6389index.html\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-31992","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31992","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=31992"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31992\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}